fixed struct alignment && refactor linter
This commit is contained in:
@@ -155,7 +155,7 @@ func indexFunction(v reflect.Value) func(i int) reflect.Value {
|
||||
return v.MapIndex(keys[i])
|
||||
}
|
||||
}
|
||||
return func(i int) reflect.Value { return reflect.Value{} }
|
||||
return func(_ int) reflect.Value { return reflect.Value{} }
|
||||
}
|
||||
|
||||
func mergeValue(values []reflect.Value) reflect.Value {
|
||||
|
||||
@@ -101,16 +101,16 @@ func TestMergeString(t *testing.T) {
|
||||
|
||||
func TestMergeNested(t *testing.T) {
|
||||
type CallReqNested struct {
|
||||
Nested *CallReqNested `json:"nested2"`
|
||||
StringArgs []string `json:"string_args"`
|
||||
Uint64Args []uint64 `json:"uint64_args"`
|
||||
Nested *CallReqNested `json:"nested2"`
|
||||
}
|
||||
|
||||
type CallReq struct {
|
||||
Nested *CallReqNested `json:"nested"`
|
||||
Name string `json:"name"`
|
||||
Req string `json:"req"`
|
||||
Arg2 int `json:"arg2"`
|
||||
Nested *CallReqNested `json:"nested"`
|
||||
}
|
||||
|
||||
dst := &CallReq{
|
||||
|
||||
Reference in New Issue
Block a user