gitlab.com/evatix-go/core@v1.3.55/corecmp/IsStringsEqual.go (about) 1 package corecmp 2 3 func IsStringsEqual(leftItems, rightItems []string) bool { 4 if leftItems == nil && rightItems == nil { 5 return true 6 } 7 8 if leftItems == nil || rightItems == nil { 9 return false 10 } 11 12 length := len(leftItems) 13 if length != len(rightItems) { 14 return false 15 } 16 17 for i := 0; i < length; i++ { 18 if leftItems[i] != rightItems[i] { 19 return false 20 } 21 } 22 23 return true 24 }