Skip to content

Commit

Permalink
fix: isNilValue
Browse files Browse the repository at this point in the history
  • Loading branch information
sesky4 committed Sep 13, 2024
1 parent fb3b3e8 commit 606675d
Show file tree
Hide file tree
Showing 5 changed files with 7 additions and 1 deletion.
1 change: 1 addition & 0 deletions tencentcloud/cdz/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
1 change: 1 addition & 0 deletions tencentcloud/cloudapp/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
4 changes: 3 additions & 1 deletion tencentcloud/common/json/encode.go
Original file line number Diff line number Diff line change
Expand Up @@ -329,8 +329,10 @@ func isEmptyValue(v reflect.Value) bool {
}

func isNilValue(v reflect.Value) bool {
// unsafe.UnsafePointer doesn't exist in go1.9
const UnsafePointer = 26
switch v.Kind() {
case reflect.Array, reflect.Map, reflect.Slice, reflect.String, reflect.Interface, reflect.Ptr:
case reflect.Chan, reflect.Func, reflect.Map, reflect.Pointer, UnsafePointer, reflect.Interface, reflect.Slice:
return v.IsNil()
}
return false
Expand Down
1 change: 1 addition & 0 deletions tencentcloud/tsi/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=
1 change: 1 addition & 0 deletions tencentcloud/vclm/go.sum
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
github.com/tencentcloud/tencentcloud-sdk-go/tencentcloud/common v1.0.1002/go.mod h1:r5r4xbfxSaeR04b166HGsBa/R4U3SueirEUpXGuw+Q0=

0 comments on commit 606675d

Please sign in to comment.