utils

package
v1.2.17 Latest Latest
Warning

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

Go to latest
Published: Nov 30, 2021 License: MIT Imports: 14 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Copy

func Copy(src interface{}) interface{}

Copy defined TODO

func Ensure

func Ensure(err error)

Ensure defined TODO

func EnsureLeft

func EnsureLeft(left interface{}, err error) interface{}

EnsureLeft defined TODO

func EnsureRight

func EnsureRight(err error, right interface{}) interface{}

EnsureRight defined TODO

func FileNameTrimSuffix

func FileNameTrimSuffix(fp string) string

FileNameTrimSuffix defined TODO

func HasBin

func HasBin(bins ...string) bool

HasBin defined TODO

func HasSuffix added in v1.2.15

func HasSuffix(s string, suffix ...string) bool

HasSuffix defined suffix of string

func ISBlank

func ISBlank(value reflect.Value) bool

ISBlank defined TODO

func InstallPackages

func InstallPackages(pkgs ...string) error

InstallPackages defined TODO

func NetWorkStatus

func NetWorkStatus() bool

NetWorkStatus defined TODO

func OpenFile

func OpenFile(name string, flag int, perm os.FileMode) (*os.File, error)

OpenFile defiend TODO

func RemoveFileWithSuffix

func RemoveFileWithSuffix(wd string, suffix string)

RemoveFileWithSuffix defined TODO

func SearchFileInDirWithSuffix

func SearchFileInDirWithSuffix(wd string, suffix string, cb func(string) bool) string

SearchFileInDirWithSuffix defined TODO

func SetFormatter

func SetFormatter(isTerminal bool)

SetFormatter defined TODO

func SetLevel

func SetLevel(cmd *cobra.Command)

SetLevel defined TODO

func ViperSetDefault

func ViperSetDefault(key string, value interface{}, standby ...interface{})

ViperSetDefault defined TODO

func WalkFileInDirWithSuffix

func WalkFileInDirWithSuffix(wd string, suffix string) ([]string, error)

WalkFileInDirWithSuffix defined TODO

Types

type DeepCopyInterface

type DeepCopyInterface interface {
	DeepCopy() interface{}
}

DeepCopyInterface defined TODO

Jump to

Keyboard shortcuts

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