Adding default value and help message to a flag

Report a typo

Correct the user string type flag declaration so that it has the default value "root" and the help message: "Specify username".

user := flag.String("user", "?", "?")

Take notice that the correct answer should not include the user := code! It should only include the: flag.String("user", "?", "?") flag declaration with the exact default value and help message mentioned above.

Enter a short text
___

Create a free account to access the full topic