github.com/solo-io/cue@v0.4.7/doc/tutorial/basics/2_types/65_defaults.txt (about) 1 cue eval defaults.cue 2 cmp stdout expect-stdout-cue 3 4 -- frontmatter.toml -- 5 title = "Default Values" 6 description = "" 7 8 -- text.md -- 9 Elements of a disjunction may be marked as preferred. 10 If there is only one mark, or the users constraints a field enough such that 11 only one mark remains, that value is the default value. 12 13 In the example, `replicas` defaults to `1`. 14 In the case of `protocol`, however, there are multiple definitions with 15 different, mutually incompatible defaults. 16 In that case, both `"tcp"` and `"udp"` are preferred and one must explicitly 17 specify either `"tcp"` or `"udp"` as if no marks were given. 18 19 -- defaults.cue -- 20 // any positive number, 1 is the default 21 replicas: uint | *1 22 23 // the default value is ambiguous 24 protocol: *"tcp" | "udp" 25 protocol: *"udp" | "tcp" 26 27 -- expect-stdout-cue -- 28 replicas: 1 29 protocol: "tcp" | "udp" | *_|_