Skip to content

Commit

Permalink
lint: gosimple S1034
Browse files Browse the repository at this point in the history
  • Loading branch information
IdrisHanafi committed Jun 27, 2023
1 parent 4426f2c commit 05722a6
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions cmd/rpcfuzz/argfuzz/argfuzz.go
Original file line number Diff line number Diff line change
Expand Up @@ -58,10 +58,10 @@ func MutateRPCArgs(args *[]interface{}, c fuzz.Continue) {
continue
}

switch d.(type) {
case string:
switch dataType := reflect.TypeOf(d).Kind(); dataType {
case reflect.String:
(*args)[i] = string(ByteMutator([]byte(d.(string)), c))
case int:
case reflect.Int:
numString := strconv.Itoa(d.(int))

byteArrString := string(ByteMutator([]byte(numString), c))
Expand All @@ -71,7 +71,7 @@ func MutateRPCArgs(args *[]interface{}, c fuzz.Continue) {
} else {
(*args)[i] = num
}
case bool:
case reflect.Bool:
(*args)[i] = c.RandBool()
default:
if reflect.TypeOf(d).Kind() == reflect.Ptr {
Expand Down

0 comments on commit 05722a6

Please sign in to comment.