Documentation
¶
Overview ¶
Package arr contains functions to interact with arrays.
The package is imported like this:
import "github.com/gouniverse/base/arr"
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func IndexMoveDown ¶
indexMoveDown moves the element at the given index down
Business logic: - if the index is last index, will be ignored - if the index out of bounds, will be ignored
Parameters: - slice: the slice to move the element from - index: the index of the element to move
Returns: - []T: the new slice
func IndexMoveUp ¶
indexMoveUp moves the element at the given index up
Business logic: - if the index is first index, will be ignored - if the index out of bounds, will be ignored
Parameters: - slice: the slice to move the element from - index: the index of the element to move
Returns: - []T: the new slice
func IndexRemove ¶
indexRemove removes the element at the given index
Business logic: - if the index out of bounds, will be ignored
Parameters: - slice: the slice to remove the element from - index: the index of the element to remove
Returns: - []T: the new slice
Types ¶
This section is empty.