Skip to content

CUE: Use enums as map index, produces generic output #893

@spinillos

Description

@spinillos

Having:

MyEnum: "a" | "b" | "c"

MyStruct: {
  val: map[MyEnum]bool
}

produces (Go):

Val interface{} `json"val"`

instead of:

Val map[MyEnum]bool `json:"val"`

This error is in all languages. Edit: This is an expected behaviour of cue since its managed as a disjunction, ignoring if all values are strings.

Metadata

Metadata

Assignees

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions