Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](slice []T, item T) bool
func ItemExists ¶
func ItemExists[T comparable](slice []T, item T) (exists bool, index int)
func SlicesEqual ¶
func SlicesEqual[T comparable](slice1, slice2 []T) bool
SlicesEqual checks if two slices contain the same elements (order doesn't matter) This is essentially set equality for slices
func StructsEqual ¶
func StructsEqual(a, b interface{}) bool
func SubtractListBFromListA ¶
func SubtractListBFromListA[T any](listA, listB []T) []T
SubtractListBFromListA returns the items in listA that are not in listB. It uses reflect.DeepEqual rather than == so elements may hold uncomparable values (e.g. Alexa ContextProperty.Value can be a map such as a light's color spectrumHsv); == on such a value panics at runtime with "comparing uncomparable type map[string]interface {}".
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.