Skip to content

Commit b0bf70a

Browse files
committed
enums: fix Value to any type and add DefaultRegistry
1 parent ca46604 commit b0bf70a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

enums/enums.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -16,7 +16,7 @@ type Descriptor struct {
1616
// MemberDescriptor is a struct that describes an enum member.
1717
type MemberDescriptor struct {
1818
Name string `json:"name"`
19-
Value int `json:"value"`
19+
Value any `json:"value"`
2020
Description string `json:"description"`
2121
}
2222

@@ -49,3 +49,6 @@ func (r *Registry) LookupDescriptor(name string) *Descriptor {
4949
}
5050
return r.descriptors[name]
5151
}
52+
53+
// DefaultRegistry is the default [Registry].
54+
var DefaultRegistry = &Registry{}

0 commit comments

Comments
 (0)