We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 0f9dc0c commit d238512Copy full SHA for d238512
1 file changed
vm_metadata_export/main.go
@@ -95,10 +95,16 @@ func main() {
95
password := flag.String("password", "", "vCenter password")
96
host := flag.String("host", "", "vCenter host")
97
98
+ flag.Usage = func() {
99
+ fmt.Fprintf(flag.CommandLine.Output(), "Usage of %s:\n", os.Args[0])
100
+ flag.PrintDefaults()
101
+ }
102
+
103
flag.Parse()
104
105
if *username == "" || *password == "" || *host == "" {
- fmt.Println("Usage: vmmetadataexporter --username <user> --password <pass> --host <host>")
106
+ fmt.Println("Error: missing required argument(s)")
107
+ flag.Usage()
108
os.Exit(1)
109
}
110
0 commit comments