util

package
v0.7.6 Latest Latest
Warning

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

Go to latest
Published: May 14, 2020 License: BSD-3-Clause Imports: 20 Imported by: 0

Documentation

Index

Constants

View Source
const (
	SHA1   = "sha1"
	SHA256 = "sha256"
	MD5    = "md5"
)

SHA1, SHA256, MD5

Variables

View Source
var (
	// Global cue runtime
	CueRuntime cue.Runtime
)

Functions

func Bash

func Bash(script string) (string, error)

func BillyCalcDirHash added in v0.4.0

func BillyCalcDirHash(dir string, FS billy.Filesystem) (string, error)

func BillyCalcFileHash added in v0.4.0

func BillyCalcFileHash(filename string, FS billy.Filesystem) (string, error)

func BillyCalcHash added in v0.4.0

func BillyCalcHash(FS billy.Filesystem) (string, error)

func BillyFilenames added in v0.4.0

func BillyFilenames(dir string, FS billy.Filesystem) ([]string, error)

func BillyGlobCalcDirHash added in v0.4.0

func BillyGlobCalcDirHash(dir string, FS billy.Filesystem, includes, excludes []string) (string, error)

func BillyGlobCalcHash added in v0.4.0

func BillyGlobCalcHash(FS billy.Filesystem, include, exclude []string) (string, error)

func BillyGlobLoadFromZip added in v0.4.0

func BillyGlobLoadFromZip(zReader *zip.Reader, FS billy.Filesystem, includes, excludes []string) error

Loads an initialized zip.Reader into an initialize billy.Filesystem

func BillyGlobWriteDirToOS added in v0.4.0

func BillyGlobWriteDirToOS(baseDir string, dir string, FS billy.Filesystem, includes, excludes []string) error

Write dir in FS onto the os filesystem at baseDir

func BillyLoadFromZip added in v0.4.0

func BillyLoadFromZip(zReader *zip.Reader, FS billy.Filesystem, trimFirstDir bool) error

func BillyReadAll

func BillyReadAll(filename string, FS billy.Filesystem) ([]byte, error)

func BillyReadAllString

func BillyReadAllString(filename string, FS billy.Filesystem) (string, error)

func BillyWriteDirToOS added in v0.4.0

func BillyWriteDirToOS(baseDir string, dir string, FS billy.Filesystem) error

Writes dir in FS onto the os filesystem at baseDir

func BillyWriteFileToOS added in v0.4.0

func BillyWriteFileToOS(baseDir string, file string, FS billy.Filesystem) error

Writes file in FS onto the os filesystem at baseDir

func CheckShouldInclude added in v0.4.0

func CheckShouldInclude(filename string, includes, excludes []string) (bool, error)

func CopyDir

func CopyDir(src string, dst string) error

Dir copies a whole directory recursively

func CopyFile

func CopyFile(src, dst string) error

File copies a single file from src to dst

func Exec

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

func GetHash

func GetHash(path string, hashAlgorithm string) (string, error)

Create hash value with local path and a hash algorithm

func NewHash

func NewHash(name *string) (hash.Hash, error)

NewHash create an instance of specific hash algorithm

func PrintCueInstance added in v0.1.1

func PrintCueInstance(i *cue.Instance) error

func UserHomeDir

func UserHomeDir() string

Types

This section is empty.

Directories

Path Synopsis
Package par implements parallel execution helpers.
Package par implements parallel execution helpers.

Jump to

Keyboard shortcuts

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