util

package
v0.24.0 Latest Latest
Warning

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

Go to latest
Published: Nov 22, 2022 License: Apache-2.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Die

func Die(exitCode int, format string, a ...interface{})

Die prints a message and exists the process with exitCode.

func GetFirstEnv

func GetFirstEnv(names ...string) string

GetFirstEnv get the value of the first defined environment variable.

func IsDir added in v0.19.0

func IsDir(path string) (bool, error)

IsDir checks if there is a directory at path. Returns true if path is a directory, false if it is a normal file or does not exist.

func IsFile added in v0.19.0

func IsFile(path string) (bool, error)

IsFile checks if there is an ordinary file at path. Returns true if path is a file.

func IsOutputTerminal added in v0.19.0

func IsOutputTerminal() bool

IsOutputTerminal answers if stdout is a terminal.

func Print

func Print(format string, a ...interface{})

Print prints a message to console.

func SuppressOutput added in v0.19.0

func SuppressOutput()

SuppressOutput suppresses output messages.

Types

This section is empty.

Jump to

Keyboard shortcuts

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