MCPcopy Create free account
hub / github.com/OpenAtomFoundation/SmartIDE / checkFlag

Function checkFlag

cli/cmd/k8s.go:600–605  ·  view source on GitHub ↗

检查参数是否填写

(fflags *pflag.FlagSet, flagName string)

Source from the content-addressed store, hash-verified

598
599// 检查参数是否填写
600func checkFlag(fflags *pflag.FlagSet, flagName string) error {
601 if !fflags.Changed(flagName) {
602 return fmt.Errorf(i18nInstance.Main.Err_flag_value_required, flagName)
603 }
604 return nil
605}
606
607func init() {
608 k8sCmd.Flags().StringP(k8s_flag_workspaceid, "", "", i18nInstance.K8s.Info_help_flag_workspaceid)

Callers 1

k8s.goFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected