File tree Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Expand file tree Collapse file tree 1 file changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -20,19 +20,19 @@ import (
2020// HasNilDifference returns true if the supplied subjects' nilness is
2121// different
2222func HasNilDifference (a , b interface {}) bool {
23- if isNil (a ) || isNil (b ) {
24- if (isNil (a ) && isNotNil (b )) || (isNil (b ) && isNotNil (a )) {
23+ if IsNil (a ) || IsNil (b ) {
24+ if (IsNil (a ) && IsNotNil (b )) || (IsNil (b ) && IsNotNil (a )) {
2525 return true
2626 }
2727 }
2828 return false
2929}
3030
31- // isNil checks the passed interface argument for Nil value.
31+ // IsNil checks the passed interface argument for Nil value.
3232// For interfaces, only 'i==nil' check is not sufficient.
3333// https://tour.golang.org/methods/12
3434// More details: https://mangatmodi.medium.com/go-check-nil-interface-the-right-way-d142776edef1
35- func isNil (i interface {}) bool {
35+ func IsNil (i interface {}) bool {
3636 if i == nil {
3737 return true
3838 }
@@ -44,6 +44,6 @@ func isNil(i interface{}) bool {
4444 return false
4545}
4646
47- func isNotNil (i interface {}) bool {
48- return ! isNil (i )
47+ func IsNotNil (i interface {}) bool {
48+ return ! IsNil (i )
4949}
You can’t perform that action at this time.
0 commit comments