From 321978fa735d5f8c3eaeca2c705a1ada7d34abbe Mon Sep 17 00:00:00 2001 From: vitalii Date: Sun, 15 Dec 2019 01:31:08 +0200 Subject: [PATCH] ref: make names more descriptive --- cmd/gowebdav/main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/cmd/gowebdav/main.go b/cmd/gowebdav/main.go index 8d8f45c..97c1010 100644 --- a/cmd/gowebdav/main.go +++ b/cmd/gowebdav/main.go @@ -15,8 +15,8 @@ import ( func main() { root := flag.String("root", os.Getenv("ROOT"), "WebDAV Endpoint [ENV.ROOT]") - usr := flag.String("user", os.Getenv("USER"), "User [ENV.USER]") - pw := flag.String("pw", os.Getenv("PASSWORD"), "Password [ENV.PASSWORD]") + user := flag.String("user", os.Getenv("USER"), "User [ENV.USER]") + password := flag.String("pw", os.Getenv("PASSWORD"), "Password [ENV.PASSWORD]") netrc := flag.String("netrc-file", filepath.Join(getHome(), ".netrc"), "read login from netrc file") method := flag.String("X", "", `Method: LS @@ -39,18 +39,18 @@ func main() { fail("Set WebDAV ROOT") } - if l := len(flag.Args()); l == 0 || l > 2 { + if argsLength := len(flag.Args()); argsLength == 0 || argsLength > 2 { fail("Unsupported arguments") } - if *pw == "" { + if *password == "" { if u, p := d.ReadConfig(*root, *netrc); u != "" && p != "" { - usr = &u - pw = &p + user = &u + password = &p } } - c := d.NewClient(*root, *usr, *pw) + c := d.NewClient(*root, *user, *password) cmd := getCmd(*method)