add .travis.yml
This commit is contained in:
parent
c89aea9b4c
commit
4d2e9ca518
8
.travis.yml
Normal file
8
.travis.yml
Normal file
@ -0,0 +1,8 @@
|
|||||||
|
language: go
|
||||||
|
sudo: false
|
||||||
|
go:
|
||||||
|
- 1.8
|
||||||
|
|
||||||
|
script:
|
||||||
|
- go test -v
|
||||||
|
- cd cmd/gost && go build
|
@ -485,7 +485,13 @@ func parseIP(s string) (ips []string) {
|
|||||||
}
|
}
|
||||||
file, err := os.Open(s)
|
file, err := os.Open(s)
|
||||||
if err != nil {
|
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)
|
scanner := bufio.NewScanner(file)
|
||||||
|
Loading…
Reference in New Issue
Block a user