deployment nginx --image=nginx --port=80mkdir mywrapper; cd mywrapper; go mod init mywrapper; cobra-cli并添加一个子命令,例如kubectl然后将.cmd/kubectl.go填充到 "fmt" "strings"
&
我正在用Go和眼镜蛇库建造一个CLI。下面的JSON需要在相应的结构中反序列化。参数作为JSON数组: (stringA, stringB), ]"type MyStruct struct {}cmd.PersistentFlags().StringSliceVarP(&opts.StringParam, "paramname", "", nil, `this is the des