X-Git-Url: http://www.git.cypherpunks.ru/?a=blobdiff_plain;f=gocheese.go;h=b27df8c02f80cba03bb636a2a76f6865815be25c;hb=1f1b1e25e9bc99c5df5ce04a71e8a530df337bb4;hp=a8f64910a94250fa5702749f36b05add4e2d3837;hpb=be1064f27f8eb6d89c9dbb3059168fccb91895ad;p=gocheese.git diff --git a/gocheese.go b/gocheese.go index a8f6491..b27df8c 100644 --- a/gocheese.go +++ b/gocheese.go @@ -63,7 +63,7 @@ var ( norefreshURLPath = flag.String("norefresh", "/norefresh/", "Non-refreshing URL path") refreshURLPath = flag.String("refresh", "/simple/", "Auto-refreshing URL path") pypiURL = flag.String("pypi", "https://pypi.org/simple/", "Upstream PyPI URL") - auth = flag.String("auth", "passwd", "Path to file with login:password lines") + passwdPath = flag.String("passwd", "passwd", "Path to file with login:password lines") fsck = flag.Bool("fsck", false, "Check integrity of all packages") version = flag.Bool("version", false, "Print version information") warranty = flag.Bool("warranty", false, "Print warranty information") @@ -425,11 +425,11 @@ func main() { } return } - auth, err := ioutil.ReadFile(*auth) + passwd, err := ioutil.ReadFile(*passwdPath) if err != nil { log.Fatal(err) } - for _, credentials := range strings.Split(strings.TrimRight(string(auth), "\n"), "\n") { + for _, credentials := range strings.Split(strings.TrimRight(string(passwd), "\n"), "\n") { splitted := strings.Split(credentials, ":") if len(splitted) != 2 { log.Fatal("Wrong auth format")