mirror of
https://github.com/fluencelabs/tendermint
synced 2025-07-01 05:31:39 +00:00
fix linter errors thrown by unconvert
, goconst
, and nakedret
(#3960)
* Remove unnecessary type conversions * Consolidate repeated strings into consts * Clothe return statements * Update blockchain/v1/reactor_fsm_test.go Co-Authored-By: Anton Kaliaev <anton.kalyaev@gmail.com> This PR repairs linter errors seen when running the following commands: golangci-lint run --no-config --disable-all=true --enable=unconvert golangci-lint run --no-config --disable-all=true --enable=goconst golangci-lint run --no-config --disable-all=true --enable=nakedret Contributes to #3262
This commit is contained in:
committed by
Anton Kaliaev
parent
7f0c55f249
commit
04d13d9945
@ -376,9 +376,9 @@ func _nonJSONStringToArg(cdc *amino.Codec, rt reflect.Type, arg string) (reflect
|
||||
rv, err := jsonStringToArg(cdc, rt, qarg)
|
||||
if err != nil {
|
||||
return rv, err, false
|
||||
} else {
|
||||
return rv, nil, true
|
||||
}
|
||||
|
||||
return rv, nil, true
|
||||
}
|
||||
|
||||
if isHexString {
|
||||
@ -396,7 +396,7 @@ func _nonJSONStringToArg(cdc *amino.Codec, rt reflect.Type, arg string) (reflect
|
||||
if rt.Kind() == reflect.String {
|
||||
return reflect.ValueOf(string(value)), nil, true
|
||||
}
|
||||
return reflect.ValueOf([]byte(value)), nil, true
|
||||
return reflect.ValueOf(value), nil, true
|
||||
}
|
||||
|
||||
if isQuotedString && expectingByteSlice {
|
||||
|
Reference in New Issue
Block a user