utils

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 25, 2025 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func EnsureJSON

func EnsureJSON(str string) string

EnsureJSON 辅助函数:确保字符串是有效的JSON格式

func PrettyJSON

func PrettyJSON(v interface{})

PrettyJSON 美化打印

func StrTI64

func StrTI64(str string) int64

StrTI64 全数字字符串转int64 (注:非全数字不能使用此函数,因忽略err)

func Ternary

func Ternary[T any](condition bool, value1, value2 T) T

Ternary 三元运算符的模拟函数

Types

This section is empty.

Directories

Path Synopsis

Jump to

Keyboard shortcuts

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