package
0.0.3
Repository: https://github.com/chand1012/go-utils.git
Documentation: pkg.go.dev

# Functions

BreakOutMap takes a map and returns two slices, one containing the keys and the other containing the values.
Contains checks if a string is in a slice of strings.
DedupeStringSlice removes duplicate strings from a slice of strings.
EndsWithAny takes a string and a slice of suffixes and returns true if the string ends with any of the suffixes.
GetJSONKeys returns the keys of a JSON object as a slice of strings.
GlobAll returns all files that match any of the given patterns.
Input prompts the user for input and returns the entered text.
InputWithColor prompts the user for input and returns the entered text.
InsertLine inserts a new line of text at the specified line number in the code.
InsertLinesAtIndices inserts multiple lines of text at the specified line numbers in the code.
LoadFile reads the contents of a file at the specified path and returns it as a string.
PrintChatCompletionStream prints the chat completion stream to the console.
PrintColoredText prints the given text in the specified CSS color code using fmt.Print.
PrintColoredTextLn prints the given text in the specified CSS color code using fmt.Println.
ReadStdin reads from standard input and returns the bytes read.
RemoveQuotes removes any quotes from a string using regex.
ReplaceLines replaces the lines between the startLine and endLine with the new text.
ReverseSlice reverses the order of the elements in a slice of any type.
StartsWithAny takes a string and a slice of prefixes and returns true if the string starts with any of the prefixes.
StringInSlice checks if a string is in a slice of strings.
StringSliceToAnySlice converts a slice of strings to a slice of any.
WriteFile writes a string to a file at the specified path.