Documentation
¶
Overview ¶
Package builtin collects identifiers that should be predeclared in the Go programming language.
While Go's standard library and built-in identifiers typically do well in catering for the needs of the programmer, some identifiers that could assist the programmer in general programming cases do not exist in the standard Go distribution. Package builtin attempts to resolve this issue by providing a set of useful identifiers for general programming.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](s []T, elem T) bool
Contains checks slice s for the existence of an element elem.
func HasOnly ¶
func HasOnly[T comparable](s []T, elem T) bool
HasOnly checks if all elements of s are elem.
func Remove ¶
func Remove[T comparable](s []T, elem T) []T
Remove attempts to remove element elem from slice s and return the resulting slice. If elem is not present in s, s is returned unchanged.
Types ¶
This section is empty.