Documentation
¶
Overview ¶
Package set provides generic set data structure implementation and string utilities.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func StringifyArray ¶
StringifyArray generates a string representation of an array in the given syntax.
node: A pointer to the syntax.Assign node representing the array. []string: An array of strings representing the stringified elements of the array.
func StringifyAssign ¶
StringifyAssign returns a string representation of the given *syntax.Assign node.
It takes a pointer to a *syntax.Assign node as its parameter. It returns a string and an error.
Types ¶
type Set ¶
type Set struct {
// contains filtered or unexported fields
}
Set represents a simple set data structure implemented using a map.
func NewSet ¶
func NewSet() *Set
NewSet creates a new Set.
It initializes a new Set with an empty map and returns a pointer to it. The returned Set is ready to use. Returns a pointer to the newly created Set.
func (*Set) Contains ¶
Contains checks if the given value is present in the set.
value: the value to check for. bool: true if the value is present, false otherwise.