mirror of
https://gitee.com/johng/gf
synced 2026-06-06 02:25:47 +08:00
improve package gcmd/gtag
This commit is contained in:
@ -57,6 +57,9 @@ func NewFromObject(object interface{}) (rootCmd *Command, err error) {
|
||||
rootCommandName = gmeta.Get(object, tagNameRoot).String()
|
||||
subCommands []*Command
|
||||
)
|
||||
if rootCommandName == "" {
|
||||
rootCommandName = rootCmd.Name
|
||||
}
|
||||
for i := 0; i < originValueAndKind.InputValue.NumMethod(); i++ {
|
||||
var (
|
||||
method = originValueAndKind.InputValue.Method(i)
|
||||
|
||||
Reference in New Issue
Block a user