From 899329aa54933a965884b52f685c2b47cb704897 Mon Sep 17 00:00:00 2001 From: "Stephen McQuay (work)" Date: Wed, 24 May 2017 13:28:07 -0700 Subject: [PATCH] clarify return type on ParseIP --- ips.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/ips.go b/ips.go index 4986f51..23d9538 100644 --- a/ips.go +++ b/ips.go @@ -10,6 +10,9 @@ var p = regexp.MustCompile(`Failed password for .* from (.*) port`) // ParseIP finds the ip address from an sshd log line that contains a failed // password attempt. +// +// A found IP address will be returned; an empty string returned indicates +// nothing was found. func ParseIP(line string) string { if m := p.FindStringSubmatch(line); m != nil { if len(m) != 2 {