util

package
v1.0.0-next.0 Latest Latest
Warning

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

Go to latest
Published: May 16, 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 ...any) error

func ExecFileTemplate

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

func ExecTemplate

func ExecTemplate(w io.Writer, tmpl string, vars any)

func Fatal

func Fatal(err error, msg string, args ...any)

func GetContext

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

func GetTimeout

func GetTimeout() time.Duration

func Infof

func Infof(format string, args ...any)

func InternalError

func InternalError(err error, msg string, args ...any)

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 ...any)

func Stdoutf

func Stdoutf(format string, args ...any)

Types

This section is empty.

Jump to

Keyboard shortcuts

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