gocritic (2/2) (#3864)

Refs #3262
This commit is contained in:
Marko
2019-08-02 08:53:52 +02:00
committed by Anton Kaliaev
parent 14fa800773
commit f9cce282da
26 changed files with 120 additions and 90 deletions

View File

@ -339,13 +339,14 @@ func jsonStringToArg(cdc *amino.Codec, rt reflect.Type, arg string) (reflect.Val
func nonJSONStringToArg(cdc *amino.Codec, rt reflect.Type, arg string) (reflect.Value, error, bool) {
if rt.Kind() == reflect.Ptr {
rv_, err, ok := nonJSONStringToArg(cdc, rt.Elem(), arg)
if err != nil {
switch {
case err != nil:
return reflect.Value{}, err, false
} else if ok {
case ok:
rv := reflect.New(rt.Elem())
rv.Elem().Set(rv_)
return rv, nil, true
} else {
default:
return reflect.Value{}, nil, false
}
} else {