How can I check if two slices are equal?
And for now, here is https://github.com/google/go-cmp which
is intended to be a more powerful and safer alternative to
reflect.DeepEqualfor comparing whether two values are semantically equal.
package main
import (
"fmt"
"github.com/google/go-cmp/cmp"
)
func main() {
a := []byte{1, 2, 3}
b := []byte{1, 2, 3}
fmt.Println(cmp.Equal(a, b)) // true
}