util

package
v1.0.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2023 License: Apache-2.0 Imports: 16 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	Version        string
	DefaultTimeout = 5 * time.Second

	Quiet bool
)

Functions

func CleanupNULLValues

func CleanupNULLValues(doc json.RawMessage) json.RawMessage

CleanupNULLValues cleans up NULL values and empty arrays from the document.

func Contains

func Contains(l []string, s string) bool

func DockerShowProgress

func DockerShowProgress(reader io.Reader) error

DockerShowProgress shows docker like progress output on terminal.

func Error

func Error(err error, msg string, args ...interface{}) error

func ExecFileTemplate

func ExecFileTemplate(fn string, tmpl string, vars any)

func ExecTemplate

func ExecTemplate(w io.Writer, tmpl string, vars interface{})

func Fatal

func Fatal(err error, msg string, args ...interface{})

func GetContext

func GetContext(ctx context.Context) (context.Context, context.CancelFunc)

func GetTimeout

func GetTimeout() time.Duration

func Infof

func Infof(format string, args ...interface{})

func InternalError

func InternalError(err error, msg string, args ...interface{})

func IsTTY

func IsTTY(f *os.File) bool

func ListDir

func ListDir(root string) map[string]bool

func LogConfigure

func LogConfigure(cfg *config.Log)

func PrettyJSON

func PrettyJSON(s any) error

func PrintError

func PrintError(err error)

func Stderrf

func Stderrf(format string, args ...interface{})

func Stdoutf

func Stdoutf(format string, args ...interface{})

Types

This section is empty.

Jump to

Keyboard shortcuts

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