tools

package
v0.0.3 Latest Latest
Warning

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

Go to latest
Published: Feb 16, 2022 License: MIT Imports: 10 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var TimeLayout string = "2006-01-02 15:04:05"

Functions

func FileClose added in v0.0.3

func FileClose(file *os.File)

func FileIsExist added in v0.0.3

func FileIsExist(filename string) bool

*

  • 判断文件是否存在 存在返回 true 不存在返回false

func FileOpen added in v0.0.3

func FileOpen(filepath string) (*os.File, error)

func FileWrite added in v0.0.3

func FileWrite(file *os.File, s string) error

func MapGet added in v0.0.2

func MapGet(p map[string]string, key string) string

func MapHas

func MapHas(kuos map[string]string, val string) bool

func Md5

func Md5(val string) string

func RandSeq

func RandSeq(n int) string

func SliceBeContains

func SliceBeContains(key string, slice []string, ignoreAa bool) bool

ignoreAa忽略大小写 key中是否含有切片的值

func SliceContains

func SliceContains(slice []string, key string, ignoreAa bool) bool

ignoreAa忽略大小写 切片的值中是否含有key的值

func SliceHas

func SliceHas(slice []string, key string, ignoreAa bool) bool

ignoreAa忽略大小写

func TimeFormat2timestamp

func TimeFormat2timestamp(settime string, isMS bool) int64

TimeFormat2timestamp 格式 "2006-01-02 15:04:05"

func TimeFormat2timestampString

func TimeFormat2timestampString(settime string, isMS bool) string

TimeFormat2timestamp 格式 "2006-01-02 15:04:05"

Types

This section is empty.

Jump to

Keyboard shortcuts

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