Documentation for version v0.47.x is no longer actively maintained. The version you are currently viewing is a static snapshot. For up-to-date documentation, see the latest version.
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
orFalse
- 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 ¶
(Help improve our docs: edit this page on GitHub)