util

package
Version: v0.4.2 Latest Latest
Warning

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

Go to latest
Published: Mar 24, 2022 License: MIT Imports: 11 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CacheDir added in v0.2.0

func CacheDir() string

CacheDir return cache dir path string

func Exec added in v0.2.0

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

func Exists added in v0.2.0

func Exists(path string) (bool, error)

func FetchURL

func FetchURL(url string) ([]byte, error)

FetchURL returns HTTP response body

func FileWalk added in v0.2.0

func FileWalk(root string, targetFiles map[string]struct{}, walkFn func(r io.Reader, path string) error) error

FileWalk walks the file tree rooted at root

func FilterTargets added in v0.2.0

func FilterTargets(prefixPath string, targets map[string]struct{}) (map[string]struct{}, error)

FilterTargets filter targets

func GetDefaultLogDir

func GetDefaultLogDir() string

GetDefaultLogDir :

func IsCommandAvailable added in v0.2.0

func IsCommandAvailable(name string) bool

func SetLogger

func SetLogger(logToFile bool, logDir string, debug, logJSON bool) error

SetLogger :

Types

This section is empty.

Source Files

Jump to

Keyboard shortcuts

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