Helper

package
v1.1.2 Latest Latest
Warning

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

Go to latest
Published: Jul 7, 2023 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelCase

func CamelCase(s string) string

CamelCase 驼峰模式

func GenFile

func GenFile(tplContent string, dest string, data map[string]interface{})

GenFile 通过模板引擎 生成文件 tplContent 是模板内容

func GetWorkDir

func GetWorkDir() string

GetWorkDir 获取当前工作目录

func Gzip

func Gzip(str string) string

func IsFileExist

func IsFileExist(filepath string) bool

func IsFilePathExist

func IsFilePathExist(filepath string) bool

IsFilePathExist 判断api文件是否存在

func LoadResource

func LoadResource(dir string) map[string]string

LoadResource 遍历文件夹,把静态文件读取出来 map["SERVICE_TPL"]=文件里面的内容

func NewTplFunction

func NewTplFunction() template.FuncMap

给模板使用的函数集

func ReadFile

func ReadFile(f string) []byte

ReadFile 读取文件

func SnakeCase

func SnakeCase(s string) string

SnakeCase 下划线模式

func Ucfirst

func Ucfirst(str string) string

Ucfirst 首字母大写

func UnGzip

func UnGzip(str string) string

Types

This section is empty.

Jump to

Keyboard shortcuts

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