mirror of
https://github.com/cbednarski/hostess
synced 2024-11-11 19:10:37 +00:00
Moved parseLine after its dependent functions
This commit is contained in:
parent
9423364cea
commit
183432da2b
24
hostess.go
24
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 {
|
||||
|
Loading…
Reference in New Issue
Block a user