Skip to content

Commit

Permalink
cherry2
Browse files Browse the repository at this point in the history
  • Loading branch information
tac0turtle committed Oct 10, 2019
1 parent b4d129b commit 47cebd8
Showing 1 changed file with 0 additions and 20 deletions.
20 changes: 0 additions & 20 deletions reflect.go
Original file line number Diff line number Diff line change
Expand Up @@ -106,25 +106,6 @@ func isDefaultValue(rv reflect.Value) (erv reflect.Value, isDefaultValue bool) {
rv, _, isNilPtr := derefPointers(rv)
if isNilPtr {
return rv, true
<<<<<<< HEAD
} else {
switch rv.Kind() {
case reflect.Bool:
return rv, rv.Bool() == false
case reflect.Int, reflect.Int8, reflect.Int16, reflect.Int32, reflect.Int64:
return rv, rv.Int() == 0
case reflect.Uint, reflect.Uint8, reflect.Uint16, reflect.Uint32, reflect.Uint64:
return rv, rv.Uint() == 0
case reflect.String:
return rv, rv.Len() == 0
case reflect.Chan, reflect.Map, reflect.Slice:
return rv, rv.IsNil() || rv.Len() == 0
case reflect.Func, reflect.Interface:
return rv, rv.IsNil()
default:
return rv, false
}
=======
}
switch rv.Kind() {
case reflect.Bool:
Expand All @@ -141,7 +122,6 @@ func isDefaultValue(rv reflect.Value) (erv reflect.Value, isDefaultValue bool) {
return rv, rv.IsNil()
default:
return rv, false
>>>>>>> 4ce542e... fix: prevent false to not be encoded (#290)
}
}

Expand Down

0 comments on commit 47cebd8

Please sign in to comment.