util

package
v0.0.0-...-9dac4f2 Latest Latest
Warning

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

Go to latest
Published: Dec 1, 2023 License: BSD-2-Clause, MIT Imports: 19 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AbPath

func AbPath(file string) string

func Camel2Underline

func Camel2Underline(s string) string

Camel2Underline 驼峰转下划线

func FormCsv

func FormCsv(resourceFile string, csvTemplate map[string]string, result interface{}) (err error)

FormCsv 导入

func GetCurrentAbPath

func GetCurrentAbPath() string

GetCurrentAbPath 最终方案-全兼容

func GetCurrentAbPathByCaller

func GetCurrentAbPathByCaller(skip int) string

GetCurrentAbPathByCaller 获取当前执行文件绝对路径(go run)

func GetCurrentAbPathByExecutable

func GetCurrentAbPathByExecutable() string

GetCurrentAbPathByExecutable 获取当前执行文件绝对路径

func InitialLower

func InitialLower(s string) string

InitialLower 首字母转小写

func InitialUpper

func InitialUpper(s string) string

InitialUpper 首字母转大写

func IsCustomField

func IsCustomField(key string) bool

IsCustomField 是否为自定义字段

func LowerCameName

func LowerCameName(s string) string

LowerCameName 小驼峰

func MakeCustomField

func MakeCustomField(key string) string

MakeCustomField 生成自定义字段

func Strikethrough

func Strikethrough(s string) string

Strikethrough 中划线

func Strikethrough2Underline

func Strikethrough2Underline(s string) string

Strikethrough2Underline 中划线转下划线

func ToCsvFile

func ToCsvFile(
	ctx context.Context,
	name string,
	source func(ctx context.Context, fields []string) (interface{}, error),
	csvTemplate map[string]string) (str string, err error)

ToCsvFile 导出

func UpperCamelName

func UpperCamelName(s string) string

UpperCamelName 大驼峰

Types

type IString

type IString string

IString .

Directories

Path Synopsis
Package mapstructure exposes functionality to convert one arbitrary Go type into another, typically to convert a map[string]interface{} into a native Go structure.
Package mapstructure exposes functionality to convert one arbitrary Go type into another, typically to convert a map[string]interface{} into a native Go structure.

Jump to

Keyboard shortcuts

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