util

package
v1.0.7 Latest Latest
Warning

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

Go to latest
Published: Sep 28, 2021 License: MIT Imports: 13 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Stderr io.Writer
View Source
var Stdout io.Writer

Functions

func CreateAndRegisterLogger

func CreateAndRegisterLogger(debug bool)

func RegisterLogger

func RegisterLogger(logger *zap.Logger)

func SetExitCode

func SetExitCode(err error)

SetExitCode sets the exit code to 1 if the error is not a context.Canceled error.

func SetStderr

func SetStderr(stderr io.Writer)

func SetStdout

func SetStdout(stdout io.Writer)

func SetupExitHandler

func SetupExitHandler(ctx context.Context) (context.Context, func())

func StructSliceToString2DSlice

func StructSliceToString2DSlice(slice interface{}) ([][]string, error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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