Skip to content

[post] How to use go's builtin template #54

@at15

Description

@at15

Type

  • request post from @at15

Related

Description

Go's built in text/template and html/template is pretty useful for generating code, custom output (e.g. docker, kubectl, helm).
However every time I need to use it I need to learn it again ... this post should list common syntax (and pitfalls)

  • reference variables
  • writing for loop
  • custom function

And common places to use go template

  • code generator
  • docker
  • helm

Update

  • 2020-08-07 Add usage section

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions