Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
var ( // Logger *slog.Logger // Logger is the default logger // LogLevel string // logLevel is the log level Environment = tuUtils.GetEnvDefault("ENVIRONMENT", "dev") // Environment is the default environment Prefix = tuUtils.GetEnvDefault("PREFIX", "data") // Prefix is the default prefix )
Functions ¶
func CreateBytes ¶
func LinesFromReader ¶
LinesFromReader returns an array of strings representing each line read from the provided io.Reader.
The function takes an io.Reader as a parameter and scans it line by line using a bufio.Scanner. Each line is then appended to the `lines` array. After scanning is complete, the function checks for any errors and calls the MaybeDie function if there is any error. Finally, the `lines` array is returned.
func UrlToLines ¶
UrlToLines retrieves the contents of a URL and returns them line by line.
Parameters: - url: the URL to retrieve the contents from. - username: the username for basic authentication. If not needed, leave it empty. - password: the password for basic authentication. If not needed, leave it empty.
Returns: - lines: an array of strings containing the lines of the retrieved content.
Types ¶
This section is empty.