enumgen

command module
v0.0.0-...-da6ce59 Latest Latest
Warning

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

Go to latest
Published: Aug 8, 2025 License: MIT Imports: 2 Imported by: 0

README

enumgen

简洁的枚举工具

规则

  • 仅支持字符类型和整型类型
  • 字符串和整型类型的零值不能做为枚举有效值. 因为ParseLabel解析失败将返回零值.
  • 枚举值或标签在该类型下必须唯一
  • 枚举值排序规则
    • 字符串无论如何都不排序, 使用定义的原始顺序
    • 整形排序按有符号/无符号排序
    • 生成的解释行, 按排序处理, 满足上述规则
    • 生成enum code是排序的
    • 生成sql为定义的原始顺序, 且默认排除0值

Documentation

The Go Gopher

There is no documentation for this package.

Directories

Path Synopsis
internal

Jump to

Keyboard shortcuts

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