Skip to content

Instantly share code, notes, and snippets.

@pivotaljohn
Created April 22, 2020 19:11
Show Gist options
  • Save pivotaljohn/44cb5c589be634ac13570222e7416b88 to your computer and use it in GitHub Desktop.
Save pivotaljohn/44cb5c589be634ac13570222e7416b88 to your computer and use it in GitHub Desktop.
Concatenating with the plus operator can lead to Starlark errors

Illustrates how concatenating with the plus operator can lead to a Starlark error.

$ ytt -f concat-with-plus.yml -f values.yml

- unknown binary op: string + int
    in <toplevel>
      concat-with-plus.yml:3 | x: #@ data.values.a + data.values.b
#@ load("@ytt:data", "data")
x: #@ data.values.a + data.values.b
#@data/values
---
a: Some String
b: 15
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment