Documentation ¶
Index ¶
- Constants
- func DumpToString(value interface{}, option gutil.DumpOption) string
- func FileNumToInt(s string) int
- func FindAbsFile(paths string, absPattern string) string
- func FindFile(paths string, pattern string) string
- func FindFiles(paths string, pattern string) []string
- func FormatCommunicationRate(rate float64) (size string)
- func FormatFileSize(fileSize int64) (size string)
- func GetExePath() string
- func GetMapFromCfg(ctx context.Context, key string, name ...string) map[string]interface{}
- func IsBaseType(t string) bool
- func IsDebugMode() bool
- func IsTypeBool(t string) bool
- func IsTypeFloatingPoint(t string) bool
- func IsTypeInteger(t string) bool
- func IsTypeNumber(t string) bool
- func IsTypeString(t string) bool
- func IsTypeUnsignedInteger(t string) bool
- func MapStrAnyMix(maps ...map[string]interface{}) (out map[string]interface{})
- func MapStrStrMix(maps ...map[string]string) (out map[string]string)
- func ProcInstanceListen()
- func RemoveStringsFirst(strs []string, value string) []string
- func RunSql(ctx context.Context, sql string, name ...string) error
- func RunSqlFromFile(ctx context.Context, path string, name ...string) error
- func SetCfgFileNameEnv(file string)
- func SetCfgPathEnv(path string)
Constants ¶
View Source
const ( TypeInt = "int" TypeInt8 = "int8" TypeInt16 = "int16" TypeInt32 = "int32" TypeInt64 = "int64" TypeUint = "uint" TypeUint8 = "uint8" TypeUint16 = "uint16" TypeUint32 = "uint32" TypeUint64 = "uint64" TypeFloat32 = "float32" TypeFloat64 = "float64" TypeBool = "bool" TypeString = "string" )
View Source
const DefaultRunConfig = "./config/config.toml"
Variables ¶
This section is empty.
Functions ¶
func DumpToString ¶ added in v1.0.1
func DumpToString(value interface{}, option gutil.DumpOption) string
func FindAbsFile ¶ added in v1.0.1
FindAbsFile 找到绝对匹配的文件 找到的我呢间
func FormatCommunicationRate ¶
FormatCommunicationRate 通讯速率换算 传入参数单位为 B/s
func FormatFileSize ¶
FormatFileSize 字节的单位转换 保留两位小数
func GetMapFromCfg ¶ added in v1.0.1
GetMapFromCfg 从配置文件中将指定 key 的值读取为 map
func IsBaseType ¶ added in v0.9.0
IsBaseType 判断字符串 <t> 是不是 Go 语言的基本数据类型
func IsTypeBool ¶ added in v0.9.0
func IsTypeFloatingPoint ¶ added in v0.9.0
func IsTypeInteger ¶ added in v0.9.0
func IsTypeNumber ¶ added in v0.9.0
func IsTypeString ¶ added in v0.9.0
func IsTypeUnsignedInteger ¶ added in v0.9.0
func MapStrAnyMix ¶
func ProcInstanceListen ¶ added in v1.0.1
func ProcInstanceListen()
func RemoveStringsFirst ¶ added in v0.7.0
RemoveStringsFirst 删除数组中第一个找到的元素 删除成功返回删除后的值, 否则返回原值
func RunSqlFromFile ¶ added in v0.9.1
RunSqlFromFile 通过文件执行 sql 语句。<path> 指代文件路径
func SetCfgFileNameEnv ¶ added in v1.0.4
func SetCfgFileNameEnv(file string)
SetCfgFileNameEnv 设置配置文件的文件名
Types ¶
This section is empty.
Click to show internal directories.
Click to hide internal directories.