utils

package
v0.1.1-beta Latest Latest
Warning

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

Go to latest
Published: Feb 9, 2023 License: GPL-3.0 Imports: 7 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FirstLower

func FirstLower(s string) string

FirstLower 字符串首字母小写

func FirstUpper

func FirstUpper(s string) string

FirstUpper 字符串首字母大写

func GetDbNameForUrl

func GetDbNameForUrl(dns string) (dbName string, err error)

func IndexOf

func IndexOf(data []string, v string) int

func IsEmpty

func IsEmpty(s string) bool

func NewTemplate

func NewTemplate(name, content, savePath, filename string, placeholder map[interface{}]interface{})

NewTemplate 创建模板 param name 模板名称 param content 模板内容 param savePath 保存的路径 param filename 文件名称 param map placeholder 占位符 { "key":"value" } => {{ .key }}

func PathExists

func PathExists(path string) (bool, error)

PathExists 判断一个文件或文件夹是否存在 输入文件路径,根据返回的bool值来判断文件或文件夹是否存在

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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