Carvel Logo

Language

Overview

Templating language used in ytt is a slightly modified version of Starlark. Following modifications were made:

  • requires end keyword for block closing
    • hence no longer whitespace sensitive (except new line breaks)
  • does not allow use of pass keyword

See full Starlark specification for detailed reference.

Types

  • NoneType: None (equivalent to null in other languages)
  • Bool: True or False
  • Integer: 1
  • Float: 1.1
  • String: "string"
  • List: [1, 2, {"a":3}]
  • Tuple: (1, 2, "a")
  • Dictionary: {"a": 1, "b": "b"}
  • Struct: struct.make(field1=123, field2="val2")
  • YAML fragment
  • Annotation: @name arg1,arg2,keyword_arg3=123

Control flow