type SomeEnumType int
const (
SomeEnumTypeA = 1 // hhh
SomeEnumTypeB = 2 // bbb
)
type Req struct {
Type SomeEnumType `json:"type"`
}
i want the Req.Type is enum, which has 1 and 2 value
and 1 has comment hhh, 2 has comment bbb
请先看一遍文档README.md
type Req struct {
Type SomeEnumType `enums:"1,2"` //1 hhh,2 bbb
}
model definitions里还不支持枚举类型,自然谈不上枚举的Comment
我知道这么做是可以实现的,我在想能不能自动化一点
我知道这么做是可以实现的,我在想能不能自动化一点
那你看一下源码怎么更自动化一些,欢迎提交PR。