CUE Tutorial

About this tutorial

This tutorial teaches the fundamentals of CUE. To try out the examples in the tutorial you can follow the installation instructions to get a working setup of CUE.

Use the cue eval or cue export commands to evaluate an example.

Click here to start

TOC

  • JSON Sugar and other Goodness
    • Quotes are Optional for Field Names
    • Commas are Optional after Fields
    • Commas are Still Required in Lists
    • Curly Braces
    • Folding of Single-Field Structs
    • Folding all Fields
    • Comments
    • Number Literals
    • String Literals
    • Bytes
  • References and Visibility
    • References and Scopes
    • Accessing Fields
    • Aliases
    • Emit Values
    • Hidden Values
  • Types and are Values
    • Duplicate Fields
    • Bottom / Error
    • Basic Types
    • Order is Irrelevant
    • Disjunctions
    • Default Values
    • Disjunctions of Structs
    • Numbers
    • Ranges
    • Predefined Ranges
    • Lists
    • Templates
  • Modules, Packages, and Instances
    • Packages
    • Imports
  • Expressions
    • Operators
    • Interpolation
    • Interpolation in Field Names
    • List Comprehensions
    • Field Comprehensions
    • Conditional Fields
    • Null or Error coalescing
Powered by Gitiles| Privacy| Terms
sourcelogblame