Skip to content

Commit

Permalink
docs: fix template helper documentation
Browse files Browse the repository at this point in the history
  • Loading branch information
muesli committed Sep 22, 2022
1 parent 642b8df commit d5ed323
Showing 1 changed file with 3 additions and 1 deletion.
4 changes: 3 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -127,9 +127,11 @@ s.Bold().Underline()

## Template Helpers

`termenv` provides a set of helper functions to style your Go templates:

```go
// load template helpers
f := termenv.TemplateFuncs(output.Profile)
f := output.TemplateFuncs()
tpl := template.New("tpl").Funcs(f)

// apply bold style in a template
Expand Down

0 comments on commit d5ed323

Please sign in to comment.