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

Function NewNumFlags

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

Source from the content-addressed store, hash-verified

225}
226
227func NewNumFlags(parent_index uint32, flags_config *FlagsConfig) IArgType {
228 p := GetArgType(parent_index)
229 new_name := fmt.Sprintf("%s_flags_%s", p.GetName(), flags_config.Name)
230 new_p := RegisterNew(new_name, p.GetTypeIndex())
231 new_i, ok := (new_p).(IArgTypeNum)
232 if !ok {
233 panic("...")
234 }
235 new_i.SetFlagsConfig(flags_config)
236 return new_p
237}
238
239func NewNumFormat(p IArgType, format_type uint32) IArgType {
240 new_name := fmt.Sprintf("%s_fmt_%d", p.GetName(), format_type)

Callers 1

SetFlagsFormatMethod · 0.92

Calls 5

GetArgTypeFunction · 0.85
RegisterNewFunction · 0.85
GetNameMethod · 0.65
GetTypeIndexMethod · 0.65
SetFlagsConfigMethod · 0.65

Tested by

no test coverage detected