MCPcopy Create free account
hub / github.com/SeeFlowerX/stackplz / RegisterFlagsConfig

Function RegisterFlagsConfig

user/argtype/argtype_flags.go:215–225  ·  view source on GitHub ↗
(type_index, parent_index uint32, flags_config *FlagsConfig)

Source from the content-addressed store, hash-verified

213var PermissionFlagsConfig = &FlagsConfig{"permission", FORMAT_OCT, PermissionFlags}
214
215func RegisterFlagsConfig(type_index, parent_index uint32, flags_config *FlagsConfig) IArgType {
216 p := GetArgType(parent_index)
217 new_name := fmt.Sprintf("%s_flags_%s", p.GetName(), flags_config.Name)
218 new_p := RegisterPre(new_name, type_index, p.GetTypeIndex())
219 new_i, ok := (new_p).(IArgTypeNum)
220 if !ok {
221 panic("...")
222 }
223 new_i.SetFlagsConfig(flags_config)
224 return new_p
225}
226
227func NewNumFlags(parent_index uint32, flags_config *FlagsConfig) IArgType {
228 p := GetArgType(parent_index)

Callers 1

initFunction · 0.85

Calls 5

GetArgTypeFunction · 0.85
RegisterPreFunction · 0.85
GetNameMethod · 0.65
GetTypeIndexMethod · 0.65
SetFlagsConfigMethod · 0.65

Tested by

no test coverage detected