From 183432da2b0c90625fa3267ad78ec4a0159c8696 Mon Sep 17 00:00:00 2001 From: Chris Bednarski Date: Wed, 4 Feb 2015 00:36:08 -0800 Subject: [PATCH] Moved parseLine after its dependent functions --- hostess.go | 24 ++++++++++++------------ 1 file changed, 12 insertions(+), 12 deletions(-) diff --git a/hostess.go b/hostess.go index 5500d92..8aaf903 100644 --- a/hostess.go +++ b/hostess.go @@ -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 {