Allow comments to appear anywhere on a line in the auth file

This commit is contained in:
ed 2016-03-15 23:52:44 -04:00
parent b714685933
commit a9c81d38f9

View File

@ -43,8 +43,8 @@ func main() {
lines := strings.Split(string(data[:size]), "\n")
for _, line := range lines {
if strings.HasPrefix(line, "#") {
continue
if i := strings.IndexRune(line, '#'); i > -1 {
line = line[:i]
}
fields := strings.Fields(line)