3 ms·
> Helm charts are a horrible example of text based templating. Every time I see " | nindent whatever" I'm asking why the fuck the tool cannot manage indentatio
by arkh 2y ago
> Helm charts are a horrible example of text based templating.
Every time I see " | nindent whatever" I'm asking why the fuck the tool cannot manage indentation.
- kevincox 2y agoAnd it breaks every time a variable gets a `:` inside of it and now you are producing invalid yaml everywhere you forgot to call `| toYaml`.
- smw 2y agoNever read anything more true in my life!
- adhamsalama 2y agoI once got a nil pointer exception when I updated a helm chart. I wondered why the hell am I getting a nil pointer exception for updating a YAML file. After some investigation I found an issue on GitHub where the maintainers said the Go team says this is an intended behavior for some case in Go templates. Wasn't fun.
- benatkin 2y agoThat isn't a typical nill/null exception, like in JavaScript, ruby, and python. That's in a language where a lot of values are non-nullable, and some of the ones that are have zero-values that can be used without getting a nil pointer exception. https://go.dev/tour/moretypes/12 https://go.dev/tour/moretypes/12 So, there's a good chance was an error that was really unexpected and it's better to show the error than to risk producing bad output.