utils

package
v0.0.0-...-7d768d8 Latest Latest
Warning

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

Go to latest
Published: Apr 26, 2019 License: MIT Imports: 15 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func B2S

func B2S(b []byte) string

B2S converts a byte slice to a string. It's fasthttpgx, but not safe. Use it only if you know what you're doing.

func DirExists

func DirExists(name string) bool

func Exists

func Exists(name string) bool

func GetCurrentExecDir

func GetCurrentExecDir() (dir string, err error)

func GetCurrentPath

func GetCurrentPath() (string, error)

func ListDir

func ListDir(dirPth string) (files []string, err error)

func ListFiles

func ListFiles(dirPth string, suffix string) (files []string, err error)

获取指定目录下的所有文件,不进入下一级目录搜索,可以匹配后缀过滤。

func ListSubPath

func ListSubPath(osDirname string) ([]string, error)

func Md5CheckSum

func Md5CheckSum(filename string) (string, error)

func S2B

func S2B(s string) []byte

S2B converts a string to a byte slice. It's fasthttpgx, but not safe. Use it only if you know what you're doing.

func StrBuilder

func StrBuilder(args ...string) string

func WriteToFile

func WriteToFile(c []byte, filename 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