util

package
v0.5.2 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: Apache-2.0 Imports: 11 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var Guarantee = Assert // More meaningful name:)

Functions

func Assert

func Assert(cond bool, format string, args ...interface{})

func CopyDir

func CopyDir(src string, dst string) error

func CopyFile

func CopyFile(src, dst string) error

func IsUnix

func IsUnix() bool

func IsWindows

func IsWindows() bool

func ListFiles

func ListFiles(dir string) ([]string, error)

func ListFilesFlat

func ListFilesFlat(dir string) ([]string, error)

func PathExists

func PathExists(path string) (bool, error)

func PhaseTimer

func PhaseTimer(name string) func()

func RandomString

func RandomString(n int) string

RandomString generates a globally unique random string of length n

func ReadFile

func ReadFile(filePath string) (string, error)

func RunCmd

func RunCmd(args ...string) error

func RunCmdOutput

func RunCmdOutput(args ...string) (string, error)

func ShouldNotReachHere

func ShouldNotReachHere()

func ShouldNotReachHereT

func ShouldNotReachHereT(msg string)

func Unimplemented

func Unimplemented()

func UnimplementedT

func UnimplementedT(msg string)

func WriteFile

func WriteFile(filePath string, content string) (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