数组比较
相同类型 相同位数才能比较
package operator_test
import (
"testing"
)
func TestCompareArray(t *testing.T){
a := [...]int{1,2,3}
b := [...]int{1,2,3}
c := [...]int{2,3,4}
//相同位数才能比较
t.Log(a == b)
t.Log(b == c)
}
数组比较
相同类型 相同位数才能比较
package operator_test
import (
"testing"
)
func TestCompareArray(t *testing.T){
a := [...]int{1,2,3}
b := [...]int{1,2,3}
c := [...]int{2,3,4}
//相同位数才能比较
t.Log(a == b)
t.Log(b == c)
}