Moved parseLine after its dependent functions

This commit is contained in:
Chris Bednarski 2015-02-04 00:36:08 -08:00
parent 9423364cea
commit 183432da2b

View File

@ -41,6 +41,18 @@ func TrimWS(s string) string {
return strings.Trim(s, " \n\t")
}
var ipv4_pattern = regexp.MustCompile(`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`)
func LooksLikeIpv4(ip string) bool {
return false
}
var ipv6_pattern = regexp.MustCompile(``)
func LooksLikeIpv6(ip string) bool {
return false
}
func parseLine(line string) []Hostname {
hostnames := make([]Hostname, 0)
@ -85,18 +97,6 @@ func parseLine(line string) []Hostname {
return hostnames
}
var ipv4_pattern = regexp.MustCompile(`^(?:[0-9]{1,3}\.){3}[0-9]{1,3}$`)
func LooksLikeIpv4(ip string) bool {
return false
}
var ipv6_pattern = regexp.MustCompile(``)
func LooksLikeIpv6(ip string) bool {
return false
}
func ContainsHostname(hostnames []Hostname, hostname Hostname) bool {
for _, v := range hostnames {
if v.Ip == hostname.Ip && v.Domain == hostname.Domain {