Documentation ¶
Index ¶
- Constants
- func BytesToInt64(bs []byte, defaultValue int64) int64
- func CopyPoint[T any](m T) T
- func DecryptByDESAndCBC(cipherText []byte) ([]byte, error)
- func Duration(s, e int64) string
- func Duration2(start, end int64) string
- func DurationSecondsOfMonth(s int64) (int64, int64)
- func EncryptByDESAndCBC(textBytes []byte) ([]byte, error)
- func FirstSecond(t time.Time) int64
- func FirstSecond2(s int64) int64
- func FormatDate(ts int64) string
- func FormatTime(ts int64) string
- func GetFirstDateOfMonth(d time.Time) time.Time
- func GetLastDateOfMonth(d time.Time) time.Time
- func GetZeroTime(d time.Time) time.Time
- func NonceStr() string
- func PKCS5Padding(ciphertext []byte, blockSize int) []byte
- func PKCS5UnPadding(origData []byte) []byte
- func SafePage[T constraints.Integer](i T) T
- func Str2Time(str string) time.Time
- func StrToTime(str string) int64
- func ToBool[T constraints.Integer](i T) bool
- func TodayFirstSecond() int64
- type Cmp
Constants ¶
View Source
const OneDaySec = int64(86400)
Variables ¶
This section is empty.
Functions ¶
func BytesToInt64 ¶
func DecryptByDESAndCBC ¶
func DurationSecondsOfMonth ¶
func EncryptByDESAndCBC ¶
func FirstSecond ¶
func FirstSecond2 ¶
func FormatDate ¶
func FormatTime ¶
func GetFirstDateOfMonth ¶
GetFirstDateOfMonth 获取传入的时间所在月份的第一天,即某月第一天的0点。如传入time.Now(), 返回当前月份的第一天0点时间。
func GetLastDateOfMonth ¶
GetLastDateOfMonth 获取传入的时间所在月份的最后一天,即某月最后一天的23:59:59。如传入time.Now(), 返回当前月份的最后一天0点时间。
func PKCS5Padding ¶
func PKCS5UnPadding ¶
func SafePage ¶
func SafePage[T constraints.Integer](i T) T
func ToBool ¶
func ToBool[T constraints.Integer](i T) bool
func TodayFirstSecond ¶
func TodayFirstSecond() int64
Types ¶
Click to show internal directories.
Click to hide internal directories.