diff options
author | Jakob Unterwurzacher | 2016-10-09 20:55:33 +0200 |
---|---|---|
committer | Jakob Unterwurzacher | 2016-10-09 20:55:33 +0200 |
commit | 9f0793ab0f7f73f8829cb86d6a645fd01eaa6849 (patch) | |
tree | abb0563914196138f40acad7a19e9d0f1fe77cce /main.go | |
parent | b70d2ffd94805c139971ece3cd372dafea5c95f3 (diff) |
main: more useful error message on unknown flag
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 4 |
1 files changed, 1 insertions, 3 deletions
@@ -216,9 +216,7 @@ func main() { } // Default operation: mount. if flagSet.NArg() != 2 { - prettyArgs := fmt.Sprintf("%q", os.Args[1:]) - // Get rid of "[" and "]" - prettyArgs = prettyArgs[1 : len(prettyArgs)-1] + prettyArgs := prettyArgs() tlog.Info.Printf("Wrong number of arguments (have %d, want 2). You passed: %s", flagSet.NArg(), prettyArgs) tlog.Fatal.Printf("Usage: %s [OPTIONS] CIPHERDIR MOUNTPOINT [-o COMMA-SEPARATED-OPTIONS]", tlog.ProgramName) |