Help us shape the future of Go! Take the 2026 Go Developer Survey

enumutil

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: Nov 21, 2024 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func GetBy

func GetBy(enumType interface{}, condition func(string) bool) interface{}

GetBy 根据传入条件获得对应枚举

func GetEnumMap

func GetEnumMap(enumType interface{}) map[string]interface{}

GetEnumMap 获取枚举名称与枚举对象的映射

func GetFieldValues

func GetFieldValues(enumType interface{}, fieldName string) []interface{}

GetFieldValues 获取枚举类中各枚举对象下指定字段的值

func GetNameFieldMap

func GetNameFieldMap(enumType interface{}, fieldName string) map[string]interface{}

GetNameFieldMap 获取枚举名与指定字段值的映射

func GetNames

func GetNames(enumType interface{}) []string

GetNames 获取枚举类中所有枚举对象的名称列表

Types

This section is empty.

Jump to

Keyboard shortcuts

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