Browse Source

Merge pull request #1038 from ShuBo6/master

fix: file.Close()
pull/1045/head
ginuerzh 2 years ago
committed by GitHub
parent
commit
48c7970942
No known key found for this signature in database GPG Key ID: B5690EEEBB952194
  1. 3
      cmd/gost/cfg.go

3
cmd/gost/cfg.go

@ -106,6 +106,7 @@ func parseUsers(authFile string) (users []*url.Userinfo, err error) {
if err != nil {
return
}
defer file.Close()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())
@ -175,7 +176,7 @@ func parseIP(s string, port string) (ips []string) {
}
return
}
defer file.Close()
scanner := bufio.NewScanner(file)
for scanner.Scan() {
line := strings.TrimSpace(scanner.Text())

Loading…
Cancel
Save