Skip to content

Commit fd8d8da

Browse files
committed
experiment: typed enums with pointer structs.
Implement typed enums in go by adding a pointer field for each enum arm to the relevant struct, and unmarshalling into the appropriate enum in a custom UnmarshalJSON method. We preserve the original `Values any` for backwards compatibility.
1 parent 1866144 commit fd8d8da

File tree

1 file changed

+74
-1
lines changed

1 file changed

+74
-1
lines changed

oxide/types.go

Lines changed: 74 additions & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

0 commit comments

Comments
 (0)