{"modulePath":"github.com/appleboy/com","version":"v1.2.2","isLatest":true,"isStandardLibrary":false,"goos":"all","goarch":"all","docs":"# package array\n\n## Functions\n\n```go\nfunc Contains[T comparable](slice []T, key T) bool\n```\nContains checks if a given key of any comparable type exists within a slice. It returns true if the key is found, otherwise it returns false.\n\nTime complexity: O(n), where n is the length of the slice. Suitable for small to medium slices or infrequent lookups. For large slices with frequent lookups, consider using a map for better performance.\n\nParameters:\n\n  - slice: A slice of any comparable type T.\n  - key: An element of type T to search for within the slice.\n\nReturns:\n\n  - bool: True if the key is found in the slice, false otherwise.\n\n","path":"github.com/appleboy/com/array","name":"array","synopsis":"","isRedistributable":true}
