dhall-golang
dhall-golang copied to clipboard
How to decode an enum
Hi, originally asked here but no responses so far https://discourse.dhall-lang.org/t/decode-enum-using-go/492 Could you give me an example of how to decode an enum into a Go type?
Dhall:
let Day =
< Monday | Tuesday | ... >
Go:
type Thing struct {
Name string `dhall:"name"`
Day ????? `dhall:"day"` <-- what goes here?
}
Thanks