util

package
v0.0.0-...-8270d06 Latest Latest
Warning

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

Go to latest
Published: Jul 2, 2019 License: Apache-2.0 Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CreatedDir

func CreatedDir(dir string)

创建文件夹

func DirExists

func DirExists(dirname string) bool

判断目录是否存在

func Exists

func Exists(name string) bool

判断档案是否存在

func FileExists

func FileExists(filename string) bool

判断文件是否存在

func FirstUpper

func FirstUpper(org string) string

func Get

func Get(uri string) []byte

func PathExists

func PathExists(path string) (bool, error)

判断文件夹是否存在

func PostForm

func PostForm(uri string, paras map[string][]string) []byte

func PostJson

func PostJson(uri string, jsons interface{}) []byte

func RemoveDir

func RemoveDir(dir string) bool

移除文件夹

func Tar

func Tar(src string, dstTar string, failIfExist bool) (err error)

将文件或目录打包成 .tar 文件 src 是要打包的文件或目录的路径 dstTar 是要生成的 .tar 文件的路径 failIfExist 标记如果 dstTar 文件存在,是否放弃打包,如果否,则会覆盖已存在的文件

func UnTar

func UnTar(srcTar string, dstDir string) (err error)

func Yamls2Bytes

func Yamls2Bytes(rootPath string, files []string) [][]byte

Types

This section is empty.

Jump to

Keyboard shortcuts

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