types

package
v0.8.0 Latest Latest
Warning

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

Go to latest
Published: Jan 12, 2026 License: GPL-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CamelTitle

func CamelTitle(str string, shortUpper bool) string

Title 下划线转驼峰

func DeepClone

func DeepClone[T any](v *T) (t *T)

DeepClone 深拷贝

func OrValue

func OrValue[T comparable](v T, or T) (t T)

func ParseIntSlice

func ParseIntSlice(s string, delimer string) []int

字符串转为int切片

func ParseJSONArray

func ParseJSONArray(v interface{}) ([]map[string]interface{}, error)

ParseJSONArray 转换为Json数组

func ParseJSONObject

func ParseJSONObject(v interface{}) (map[string]interface{}, error)

ParseJSONObject 转换为Json对象

func Ternary

func Ternary[T any](cond bool, trueVal, falseVal T) T

Ternary returns the first argument if cond is true, otherwise it returns the second.

func Title

func Title(str string) string

不包含前缀的较短的Title

Types

This section is empty.

Jump to

Keyboard shortcuts

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