tutils

package module
v0.0.0-...-533a6ae Latest Latest
Warning

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

Go to latest
Published: Apr 12, 2024 License: Apache-2.0 Imports: 3 Imported by: 0

README

tutils

utils for golang

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Close

func Close(closers ...io.Closer)

Close 静默批量关闭

func Json

func Json(v interface{}) string

Json 将v使用json.Marshal转换,忽略错误

func Remove

func Remove(names ...string)

Remove 静默批量删除文件

func Ternary

func Ternary[T interface{}](condition bool, x, y T) T

Ternary 三元表达式,当condition成立时返回x,否则返回y

Types

This section is empty.

Directories

Path Synopsis
Package tid 生成唯一id工具 生成规则:机器ip+进程pid+毫秒时间戳+自增序列 注意该包如果初始化失败则会直接panic
Package tid 生成唯一id工具 生成规则:机器ip+进程pid+毫秒时间戳+自增序列 注意该包如果初始化失败则会直接panic

Jump to

Keyboard shortcuts

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