github.com/joomcode/cue@v0.4.4-0.20221111115225-539fe3512047/doc/tutorial/basics/4_references/99_hidden.txt (about)

     1  cue export hidden.cue
     2  cmp stdout expect-stdout-cue
     3  
     4  -- frontmatter.toml --
     5  title = "Hidden Fields"
     6  description = ""
     7  
     8  -- text.md --
     9  A non-quoted field name that starts with an underscore (`_`) is not
    10  emitted from the output.
    11  To include fields in the configuration that start with an underscore
    12  put them in quotes.
    13  
    14  Quoted and non-quoted fields share the same namespace unless they start
    15  with an underscore.
    16  
    17  -- hidden.cue --
    18  "_foo": 2
    19  _foo:   3
    20  foo:    4
    21  _#foo:  5
    22  
    23  -- expect-stdout-cue --
    24  {
    25      "_foo": 2,
    26      "foo": 4
    27  }