Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ContainString ¶
----------------------------------------------------------------------------- ContainString - Checks if a slice contains a specific string -----------------------------------------------------------------------------
Parameters:
- slice ([]string): The slice to check.
- item (string): The string to look for in the slice.
Returns:
- (bool): True if the slice contains the string, otherwise false.
-----------------------------------------------------------------------------
func ContainsString ¶
----------------------------------------------------------------------------- ContainsString - Checks if a slice contains a specific string -----------------------------------------------------------------------------
Parameters:
- slice ([]string): The slice to check.
- item (string): The string to look for in the slice.
Returns:
- (bool): True if the slice contains the string, otherwise false.
-----------------------------------------------------------------------------
func Max ¶
----------------------------------------------------------------------------- Max - Calculates the maximum of two integers -----------------------------------------------------------------------------
Parameters:
- x (int): The first integer.
- y (int): The second integer.
Returns:
- (int): The maximum of the two integers.
-----------------------------------------------------------------------------
func Min ¶
----------------------------------------------------------------------------- Min - Calculates the minimum of two integers -----------------------------------------------------------------------------
Parameters:
- x (int): The first integer.
- y (int): The second integer.
Returns:
- (int): The minimum of the two integers.
-----------------------------------------------------------------------------
Types ¶
type OrderedSet ¶
type OrderedSet struct {
// contains filtered or unexported fields
}
func NewOrderedSet ¶
func NewOrderedSet() *OrderedSet
----------------------------------------------------------------------------- NewOrderedSet - Creates a new instance of OrderedSet -----------------------------------------------------------------------------
Parameters:
- None
Returns:
- (*OrderedSet): A pointer to the newly created OrderedSet.
-----------------------------------------------------------------------------
func (*OrderedSet) Add ¶
func (s *OrderedSet) Add(item string)
----------------------------------------------------------------------------- Add - Adds a string to the OrderedSet if it is not already present -----------------------------------------------------------------------------
Parameters:
- item (string): The string to add to the OrderedSet.
Returns:
- None
-----------------------------------------------------------------------------
func (*OrderedSet) Contains ¶
func (s *OrderedSet) Contains(item string) bool
----------------------------------------------------------------------------- Contains - Checks if the OrderedSet contains a specific string -----------------------------------------------------------------------------
Parameters:
- item (string): The string to check for in the OrderedSet.
Returns:
- (bool): True if the OrderedSet contains the string, otherwise false.
-----------------------------------------------------------------------------
func (*OrderedSet) Items ¶
func (s *OrderedSet) Items() []string
----------------------------------------------------------------------------- Items - Returns all items in the OrderedSet in the order they were added -----------------------------------------------------------------------------
Parameters:
- None
Returns:
- ([]string): A slice of strings containing all items in the OrderedSet.
-----------------------------------------------------------------------------
func (*OrderedSet) Remove ¶
func (s *OrderedSet) Remove(item string)
----------------------------------------------------------------------------- Remove - Removes a string from the OrderedSet if it is present -----------------------------------------------------------------------------
Parameters:
- item (string): The string to remove from the OrderedSet.
Returns:
- None
-----------------------------------------------------------------------------