util

package
v1.1.7 Latest Latest
Warning

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

Go to latest
Published: Nov 2, 2021 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelString

func CamelString(s string) string

func CopyFile added in v0.0.6

func CopyFile(src, dst string) (ok bool, err error)

func CopyPath added in v0.0.6

func CopyPath(src, dst string) (ok bool, err error)

func CreateMod added in v0.0.6

func CreateMod(root string) (err error)

func FmtCode added in v0.0.6

func FmtCode() (err error)

func GenProto added in v1.1.0

func GenProto(name string) (err error)

func GetApiPrefix added in v1.1.2

func GetApiPrefix() (apiPrefix string, err error)

func GetFileInfo added in v0.0.6

func GetFileInfo(src string) os.FileInfo

func GetMethod added in v1.1.7

func GetMethod(name string) (method string)

func GetPwd added in v1.1.7

func GetPwd() (dir string)

func IsExistsFile added in v0.0.6

func IsExistsFile(path string) (ok bool, err error)

func IsExitsDir added in v0.0.6

func IsExitsDir(dir string) (ok bool, err error)

func Mkdir added in v0.0.6

func Mkdir(dir string) (err error)

func ReadAll added in v0.0.6

func ReadAll(filePth string) ([]byte, error)

func Replace added in v0.0.6

func Replace(content, mod, camel, class, snake, hyphen string) (tpl string)

func ReplaceAll added in v0.0.6

func ReplaceAll(root, old, new string) (err error)

func ReplaceHttp added in v1.1.2

func ReplaceHttp(content, mod, camel, class, snake, hyphen, apiPrefix string) (tpl string)

func SnakeString

func SnakeString(s string) string

func TransformName added in v0.0.6

func TransformName(name string) (camel, class, snake, hyphen string)

func Unwrap

func Unwrap(err error) (uerr error)

func WriteToFile added in v0.0.6

func WriteToFile(fileName string, content string) (err error)

Types

This section is empty.

Jump to

Keyboard shortcuts

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