Commit 4d2e9ca5 authored by rui.zheng's avatar rui.zheng

add .travis.yml

parent c89aea9b
language: go
sudo: false
go:
- 1.8
script:
- go test -v
- cd cmd/gost && go build
\ No newline at end of file
......@@ -485,7 +485,13 @@ func parseIP(s string) (ips []string) {
}
file, err := os.Open(s)
if err != nil {
return strings.Split(s, ",")
ss := strings.Split(s, ",")
for _, s := range ss {
if ip := net.ParseIP(s); ip != nil {
ips = append(ips, s)
}
}
return
}
scanner := bufio.NewScanner(file)
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment