We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent d8acb84 commit b923c41Copy full SHA for b923c41
xflag/xflag.go
@@ -48,7 +48,12 @@ func Register(fs ...CommandNode) {
48
49
func RegisterSpecify(cnd *CommandNode, fs ...CommandNode) {
50
for _, c := range fs {
51
- c.Flags(c.Command)
+ if c.Command == nil || c.Name == "" {
52
+ panic("command node name or comment is not nil ")
53
+ }
54
+ if c.Flags != nil {
55
+ c.Flags(c.Command)
56
57
cnd.Command.AddCommand(c.Command)
58
bucket.instances.Store(c.Name, c.Command)
59
}
0 commit comments