v0.0.168
This commit is contained in:
13
langext/equals.go
Normal file
13
langext/equals.go
Normal file
@@ -0,0 +1,13 @@
|
||||
package langext
|
||||
|
||||
func EqualsPointerVal[T comparable](v1 *T, v2 *T) bool {
|
||||
if v1 == nil && v2 == nil {
|
||||
return true
|
||||
}
|
||||
|
||||
if v1 == nil || v2 == nil {
|
||||
return false
|
||||
}
|
||||
|
||||
return *v1 == *v2
|
||||
}
|
Reference in New Issue
Block a user