github.com/Mericusta/go-stp@v0.6.8/slice.go (about) 1 package stp 2 3 func Compare[T comparable](s1, s2 []T) bool { 4 if len(s1) != len(s2) { 5 return false 6 } 7 l := len(s1) 8 for index := 0; index != l; index++ { 9 if s1[index] != s2[index] { 10 return false 11 } 12 } 13 return true 14 }