tour
tour copied to clipboard
P3页 少了name变量定义
P3 应该把
switch args[0] {
case "go":
goCmd := flag.NewFlagSet("go", flag.ExitOnError)
goCmd.StringVar(&name, "name", "Go语言", "帮助信息")
改成
var name string
switch args[0] {
case "go":
goCmd := flag.NewFlagSet("go", flag.ExitOnError)
goCmd.StringVar(&name, "name", "Go语言", "帮助信息")