WeSearch

Helm2cue: An experiment in converting Go text/template to CUE

·17 min read · 0 reactions · 0 comments · 14 views
#technology#programming#templates
Helm2cue: An experiment in converting Go text/template to CUE
⚡ TL;DR · AI summary

Helm2cue is an experimental project aimed at converting Go's text/template to CUE, using Helm charts as a primary example. The initiative addresses common issues faced by various template languages that generate structured data. It focuses on automating the conversion process while maintaining the integrity of the original templates.

Key facts
Original article
GitHub
Read full at GitHub →
Opening excerpt (first ~120 words) tap to expand

helm2cue An experiment in converting Go text/template to CUE, using Helm charts as the driving example. Go's text/template package is widely used to generate structured output (YAML, JSON, etc.) from templates with control flow, pipelines, and helper definitions. CUE can express the same data more directly, with types, defaults, and constraints instead of string interpolation and whitespace wrangling. This project explores how far an automated conversion from one to the other can go. The underlying problem is not specific to Go or Helm. Conversations with people struggling with Jinja templates in the Python world (Ansible, SaltStack, etc.) helped motivate this work: any template language that generates structured data by splicing strings into YAML or JSON hits the same class of issues.

Excerpt limited to ~120 words for fair-use compliance. The full article is at GitHub.

Anonymous · no account needed
Share 𝕏 Facebook Reddit LinkedIn Threads WhatsApp Bluesky Mastodon Email

Discussion

0 comments

More from GitHub