mirror of
https://github.com/tursom/GoCollections.git
synced 2025-03-15 18:36:56 +08:00
13 lines
161 B
Go
13 lines
161 B
Go
package lang
|
|
|
|
type Object interface {
|
|
Equals(e Object) bool
|
|
}
|
|
|
|
func Equals(e Object, t Object) bool {
|
|
if e == nil {
|
|
return t == nil
|
|
}
|
|
return e.Equals(t)
|
|
}
|