From: Sergey Matveev Date: Sat, 5 Oct 2019 13:13:03 +0000 (+0300) Subject: Rename -auth to -passwd for clarity X-Git-Tag: v2.0.0~33 X-Git-Url: http://www.git.cypherpunks.ru/?p=gocheese.git;a=commitdiff_plain;h=1f1b1e25e9bc99c5df5ce04a71e8a530df337bb4 Rename -auth to -passwd for clarity --- 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")