utils

package
v0.0.0-...-3450932 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2022 License: MIT Imports: 11 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// From: /usr/local/go/src/os/proc.go
	// Exit causes the current program to exit with the given status code.
	// Conventionally, code zero indicates success, non-zero an error.
	// The program terminates immediately; deferred functions are not run.
	//
	// For portability, the status code should be in the range [0, 125].
	ExitCodeOK   = 0
	ExitCodeErr1 = 1
)

Some errors code to indicate exit status.

View Source
const (
	ColourRed     = "\033[91m"
	ColourGreen   = "\033[92m"
	ColourReset   = "\033[0m"
	ColourBlue    = "\033[34m"
	ColourMagenta = "\033[95m"
)

Some colours to make logging statements more obvious.

View Source
const (
	GoModFileName = "go.mod"
)

Variables

View Source
var ErrFailedToFindGoMod = errors.New(`couldn't find "go.mod"`)

Functions

func GetAppName

func GetAppName(loggerParent *zerolog.Logger) (string, error)

GetAppName - get the module name as defined in `go.mod`. Function 'GetAppName' is too long (63 > 60) (funlen)go-lint nolint:funlen

func MakeAssertAndRequire

func MakeAssertAndRequire(t *testing.T) (asserter *assert.Assertions, requirer *require.Assertions)

func MakeTestCaseDependencies

func MakeTestCaseDependencies(t *testing.T) (asserter *assert.Assertions, requirer *require.Assertions, logger *zerolog.Logger)

Types

This section is empty.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL