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

Function checkFlagRequired

cli/cmd/host/host-add.go:109–114  ·  view source on GitHub ↗

检查参数是否填写

(fflags *pflag.FlagSet, flagName string)

Source from the content-addressed store, hash-verified

107
108// 检查参数是否填写
109func checkFlagRequired(fflags *pflag.FlagSet, flagName string) error {
110 if !fflags.Changed(flagName) {
111 return fmt.Errorf(i18nInstance.Main.Err_flag_value_required, flagName)
112 }
113 return nil
114}
115
116// 获取Flag值
117func getFlagValue(fflags *pflag.FlagSet, flag string) string {

Callers 1

host-add.goFile · 0.70

Calls

no outgoing calls

Tested by

no test coverage detected