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")
}
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")