tools

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: May 13, 2024 License: Apache-2.0 Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AsString

func AsString(src interface{}) string

AsString 转成string

func BuildDir

func BuildDir(absDir string) error

BuildDir 创建目录

func DbcToSbc

func DbcToSbc(str string) string

DbcToSbc 全角转半角

func GetModelPath

func GetModelPath() string

GetModelPath 获取程序运行目录

func GetTimeStr

func GetTimeStr(tm time.Time) string

GetTimeStr 获取时间字符串

func WriteFile

func WriteFile(filename string, src []string, isClear bool) bool

WriteFile 写入文件

Types

type Time

type Time struct {
	time.Time
}

Time json marsh 重写

func (Time) MarshalJSON

func (t Time) MarshalJSON() ([]byte, error)

func (Time) String

func (t Time) String() string

func (*Time) UnmarshalJSON

func (t *Time) UnmarshalJSON(data []byte) (err error)

Jump to

Keyboard shortcuts

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