Skip to content

Commit

Permalink
lint:
Browse files Browse the repository at this point in the history
  • Loading branch information
jerome-quere committed Jun 15, 2020
1 parent fec6ec4 commit b74d884
Showing 1 changed file with 0 additions and 3 deletions.
3 changes: 0 additions & 3 deletions internal/args/args.go
Original file line number Diff line number Diff line change
Expand Up @@ -205,10 +205,8 @@ func isPositionalArg(arg string) bool {

// This function take a go struct and a name that comply with ArgSpec name notation (e.g "friends.{index}.name")
func GetArgType(argType reflect.Type, name string) (reflect.Type, error) {

var recursiveFunc func(argType reflect.Type, parts []string) (reflect.Type, error)
recursiveFunc = func(argType reflect.Type, parts []string) (reflect.Type, error) {

switch {
case argType.Kind() == reflect.Ptr:
return recursiveFunc(argType.Elem(), parts)
Expand Down Expand Up @@ -251,7 +249,6 @@ func GetArgType(argType reflect.Type, name string) (reflect.Type, error) {
return argType, nil
}
}

}
return nil, fmt.Errorf("count not find %s", name)
}
Expand Down

0 comments on commit b74d884

Please sign in to comment.