Documentation
¶
Index ¶
- func AppendIfNew(strList []string, newItem string) []string
- func CastNumberAsFloat64(val any) (float64, error)
- func Find(slice []string, val string) (int, bool)
- func GenerateRandomInt(min, max int) int
- func GenericJSONParsing[T any](filePath string) (T, error)
- func GenericYAMLParsing[T any](filePath string) (T, error)
- func GetFileAsLines(filePath string, maxLineLength ...int) ([]string, error)
- func IsALetter(element byte) bool
- func PrintMemUsage()
- func ValueEqual[T comparable](item1, item2 *T) bool
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AppendIfNew ¶
AppendIfNew add item to string array if not already in slice
func CastNumberAsFloat64 ¶
func Find ¶
Find takes a slice and looks for an element in it. If found it will return it's key, otherwise it will return -1 and a bool of false.
func GenerateRandomInt ¶
func GenericJSONParsing ¶
GenericJSONParsing Parse into struct
func GenericYAMLParsing ¶
GenericYAMLParsing Parse into struct
func GetFileAsLines ¶
GetFileAsLines reads a file and return the content as a string array.
If some processed lines are longer than 65536 characters, maxLineLength needs to be added as an argument.
func PrintMemUsage ¶
func PrintMemUsage()
func ValueEqual ¶
func ValueEqual[T comparable](item1, item2 *T) bool
ValueEqual check that 2 pointers to comparable items point to values that are equal
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.