util

package
v2.9.1+incompatible Latest Latest
Warning

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

Go to latest
Published: Apr 13, 2022 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func PanicOnError

func PanicOnError(err error)

PanicOnError panics if err is not nil

func SourceArgs

func SourceArgs(args []string) ([]string, error)

func SourceMode

func SourceMode(args []string) bool

func Ticker

func Ticker(cb func(), delay time.Duration, done chan bool)

Ticker repeatedly calls cb with a delay in between calls. It stops doing This When a element is sent to the done channel.

func ValidateArgs

func ValidateArgs(args []string) error

func WithinWorkingDir

func WithinWorkingDir(targetPath string, cb func(workingDir string))

WithinWorkingDir changes the current working directory temporarily and executes cb within that context.

func WriteFileIfChanged

func WriteFileIfChanged(outputFilepath string, output []byte) bool

Types

This section is empty.

Jump to

Keyboard shortcuts

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