gobox

package module
v0.13.3 Latest Latest
Warning

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

Go to latest
Published: Nov 19, 2024 License: MIT Imports: 2 Imported by: 0

README

gobox

Golang工具集

注: go版本 1.18+, 用了泛型

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Select

func Select[T any](exp bool, yes, no T) T

Select 模拟三元运算符

func SetDefault added in v0.12.6

func SetDefault(in interface{})

SetDefault 给结构体设置默认值

用法:

type person struct {
	Name   string      `default:"test"`
	Age    int         `default:"18"`
	Status enum.String `default:"1111"`
}

Types

This section is empty.

Jump to

Keyboard shortcuts

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