mutils

package
v0.0.37 Latest Latest
Warning

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

Go to latest
Published: Mar 3, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ByteSliceToString added in v0.0.5

func ByteSliceToString(bs []byte) string

ByteSliceToString is used when you really want to convert a slice // of bytes to a string without incurring overhead. It is only safe to use if you really know the byte slice is not going to change // in the lifetime of the string

func GetLocalDayByStartHour added in v0.0.25

func GetLocalDayByStartHour(hour int) (time.Time, error)

GetLocalDayByStartHour 获取当天日期开始时间

func GetLocalDayStart added in v0.0.16

func GetLocalDayStart() (time.Time, error)

GetLocalDayStart 获取当天开始时间

func GetLocalDayStr added in v0.0.18

func GetLocalDayStr() string

GetLocalDayStr 获取当天日期字符串

func GetLocalDayStrByStartHour added in v0.0.19

func GetLocalDayStrByStartHour(hour int) (string, error)

GetLocalDayStrByStartHour 获取当天日期字符串

func GetLocalWeekByStartHour added in v0.0.25

func GetLocalWeekByStartHour(hour int) (time.Time, error)

GetLocalWeekByStartHour 获取当周日期开始时间

func GetLocalWeekStart added in v0.0.16

func GetLocalWeekStart() (time.Time, error)

GetLocalWeekStart 获取周天开始时间

func GetLocalWeekStrByStartHour added in v0.0.23

func GetLocalWeekStrByStartHour(hour int) (string, error)

GetLocalWeekStrByStartHour 获取当周日期字符串

func GetUUIDStr

func GetUUIDStr() string

GetUUIDStr 获取唯一字符串

func GetUnixLocalWeekStart added in v0.0.26

func GetUnixLocalWeekStart(unixAt int64) (time.Time, error)

GetUnixLocalWeekStart 获取周天开始时间

func GetUnixOfLocalWeekStrByStartHour added in v0.0.26

func GetUnixOfLocalWeekStrByStartHour(unixAt int64, hour int) (string, error)

GetUnixOfLocalWeekStrByStartHour 获取时间点所在的当周日期字符串

func IsInSlice

func IsInSlice(arr []interface{}, iv interface{}) bool

IsInSlice 数字是否在数组中

func IsIntInSlice

func IsIntInSlice(arr []int64, str int64) bool

IsIntInSlice 数字是否在数组中

func IsStringInSlice

func IsStringInSlice(arr []string, str string) bool

IsStringInSlice 字符串是否在数组中

func StringToBytes added in v0.0.6

func StringToBytes(s string) []byte

StringToBytes 字符串转bs

Types

This section is empty.

Jump to

Keyboard shortcuts

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