package
2.0.0-alpha.7
Repository: https://github.com/roman-kart/go-initial-project.git
Documentation: pkg.go.dev

# Functions

No description provided by the author
DownloadFile download a file from URL to specific filepath Accepts: - filepath - path to the file - url - URL of the file - logger *[zap.Logger] - logger Returns: - error - nil or error if any error occurred.
DownloadFileWithContext download a file from URL to specific filepath with context Accepts: - ctx context.Context - context - filepath - path to the file - url - URL of the file - logger *[zap.Logger] - logger Returns: - error - nil or error if any error occurred.
ExecuteCommandWithOutput executes the given command and returns the output.
FirstNonEmpty returns the first non-empty value.
GenerateRandomInt returns a random integer between min and max.
GenerateRandomInt64 returns a random int64 between min and max.
GenerateUUID generate a UUID string.
GetErrorWrapper returns a function for wrapping errors.
GetPathFromRoot returns the path of the given path relative to the project root path.
GetRootPath returns the root path of the project.
No description provided by the author
NewErrHTTPWrongStatus is a function for creating [ErrHTTPWrongStatus].
NewErrorWrapperCreator creates a new ErrorWrapperCreator.
PanicOnError panics if err is not nil.
No description provided by the author
SortMapKeys sort map's keys.
WrapMethodError wrap an error with method name.

# Variables

ErrHTTPWrongStatus is an error type for wrong HTTP status.

# Structs

ErrorWrapperCreator creates functions for wrapping errors.