diff --git a/main/client.go b/main/client.go index ddb93f7..54433c1 100644 --- a/main/client.go +++ b/main/client.go @@ -30,14 +30,16 @@ func main() { root := flag.String("root", "URL", "WebDAV Endpoint") usr := flag.String("user", "", "user") pw := flag.String("pw", "", "password") - mm := strings.ToUpper(*(flag.String("X", "GET", "Method ..."))) - m := &mm + m := flag.String("X", "GET", "Method ...") flag.Parse() if *root == "URL" { Fail(nil) } + M := strings.ToUpper(*m) + m = &M + c := d.NewClient(*root, *usr, *pw) if err := c.Connect(); err != nil { Fail(fmt.Sprintf("Failed to connect due to: %s", err.Error()))