Documentation ¶
Index ¶
- func BigIntFromString(s string) (*big.Int, error)
- func Contains[T comparable](value T, sliceB []T) bool
- func ExpandScientificNotation(s string) (string, error)
- func GetBlockExplorerTxLinkInfo(chainId int, txHash string) string
- func GetenvSafe(key string) string
- func HasDuplicates[T comparable](slice []T) bool
- func IsScientificNotation(s string) bool
- func IsSubset[T comparable](sliceA, sliceB []T) bool
- func PrettyPrintStruct(v interface{})
- func PrintBlockExplorerTxLink(chainId int, txHash string)
- func SimplifyValue(input string, decimalPlaces int) string
- func Sleep()
- type NoOpPrinter
- type Printer
- type StdOutPrinter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Contains ¶
func Contains[T comparable](value T, sliceB []T) bool
Contains checks if the slice contains the given value.
func GetenvSafe ¶
func HasDuplicates ¶
func HasDuplicates[T comparable](slice []T) bool
HasDuplicates checks if the provided slice contains any duplicate elements. It accepts a slice of any comparable type and returns true if there are duplicates, otherwise it returns false.
func IsScientificNotation ¶
IsScientificNotation checks if the string is in scientific notation (like 1e+18).
func IsSubset ¶
func IsSubset[T comparable](sliceA, sliceB []T) bool
IsSubset checks if all elements of sliceA are also present in sliceB. It returns true if sliceA is a subset of sliceB, otherwise it returns false.
func PrettyPrintStruct ¶
func PrettyPrintStruct(v interface{})
func SimplifyValue ¶
Types ¶
type NoOpPrinter ¶
type NoOpPrinter struct{}
func (NoOpPrinter) Printf ¶
func (n NoOpPrinter) Printf(format string, a ...interface{})
type StdOutPrinter ¶
type StdOutPrinter struct{}
StdOutPrinter is a Printer that writes to standard output.
func (StdOutPrinter) Printf ¶
func (p StdOutPrinter) Printf(format string, a ...interface{})
Source Files ¶
Click to show internal directories.
Click to hide internal directories.