github.com/itsabgr/go-handy@v0.0.0-20220724000257-022d51f2b9c6/equal.go (about)

     1  package handy
     2  
     3  import "bytes"
     4  
     5  func Equal(a, b any) bool {
     6  	switch (a).(type) {
     7  	case []byte:
     8  		return bytes.Equal(a.([]byte), b.([]byte))
     9  	}
    10  	return a == b
    11  }