Documentation ¶
Overview ¶
Package godash provides a collection of utility functions for Go, inspired by JavaScript's lodash library.
Package godash is a collection of various utilities for Go.
Package godash provides a collection of utility functions for Go, inspired by JavaScript's lodash library.
Index ¶
- func AnyEquality[A any](a, b A) bool
- func ComparableEquality[A comparable](a, b A) bool
- func HashableEquality[A Hashable, B Hashable](a A, b B) bool
- func NumberEquality[N Number](a, b N) bool
- func NumberGreaterThan[N Number](a, b N) bool
- func NumberGreaterThanOrEqual[N Number](a, b N) bool
- func NumberLessThan[N Number](a, b N) bool
- func NumberLessThanOrEqual[N Number](a, b N) bool
- type Hashable
- type Iterable
- type Number
- type Pair
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AnyEquality ¶
AnyEquality Compares two values of any type and returns true if they are equal using reflect.DeepEqual.
func ComparableEquality ¶
func ComparableEquality[A comparable](a, b A) bool
ComparableEquality Compares two values of type comparable and returns true if they are equal.
func HashableEquality ¶
HashableEquality compares two values of any type that implement the Hashable interface and returns true if they are equal.
func NumberEquality ¶ added in v0.6.8
NumberEquality compares two numbers and returns true if they are equal.
func NumberGreaterThan ¶ added in v0.6.8
NumberGreaterThan compares two numbers and returns true if a is greater than b.
func NumberGreaterThanOrEqual ¶ added in v0.6.8
NumberGreaterThanOrEqual compares two numbers and returns true if a is greater than or equal to b.
func NumberLessThan ¶
NumberLessThan compares two numbers and returns true if a is less than b.
func NumberLessThanOrEqual ¶ added in v0.6.8
NumberLessThanOrEqual compares two numbers and returns true if a is less than or equal to b.
Types ¶
type Hashable ¶
type Hashable interface { // Hash returns a string representation of the value. Hash() string }
Hashable is an interface that represents any type that can be converted to a string using a hash function.
Directories ¶
Path | Synopsis |
---|---|
Package functions contains higher-order functions that are useful for various purposes.
|
Package functions contains higher-order functions that are useful for various purposes. |
Package hashablemaps offers tools for handling and manipulating map data structures with hashable keys.
|
Package hashablemaps offers tools for handling and manipulating map data structures with hashable keys. |
Package hashablesets provides functionality for creating and manipulating set data structures with hashable elements.
|
Package hashablesets provides functionality for creating and manipulating set data structures with hashable elements. |
Package linkedlist provides functionality for creating and manipulating doubly linked lists.
|
Package linkedlist provides functionality for creating and manipulating doubly linked lists. |
Package maps provides functions for manipulating maps.
|
Package maps provides functions for manipulating maps. |
Package queues offers various utilities for handling and manipulating queues data structures.
|
Package queues offers various utilities for handling and manipulating queues data structures. |
Package search provides various linear search, bisect search, and bisect insertion functions.
|
Package search provides various linear search, bisect search, and bisect insertion functions. |
Package sets provides functionality for creating and manipulating set data structures.
|
Package sets provides functionality for creating and manipulating set data structures. |
Package slices offers various utilities for handling and manipulating slice data structures.
|
Package slices offers various utilities for handling and manipulating slice data structures. |
Package stacks offers various utilities for handling and manipulating stack data structures.
|
Package stacks offers various utilities for handling and manipulating stack data structures. |
Package strutil contains various string manipulation utilities.
|
Package strutil contains various string manipulation utilities. |
Package utils contains a collection of utility functions that can be used throughout the Go application.
|
Package utils contains a collection of utility functions that can be used throughout the Go application. |