]> Cypherpunks.ru repositories - gocheese.git/commitdiff
Rename -auth to -passwd for clarity
authorSergey Matveev <stargrave@stargrave.org>
Sat, 5 Oct 2019 13:13:03 +0000 (16:13 +0300)
committerSergey Matveev <stargrave@stargrave.org>
Sat, 5 Oct 2019 13:13:03 +0000 (16:13 +0300)
gocheese.go

index a8f64910a94250fa5702749f36b05add4e2d3837..b27df8c02f80cba03bb636a2a76f6865815be25c 100644 (file)
@@ -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")