Skip to content

diazjf/go-templating

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

3 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

GoLang Templating Made Easy

This is an example repo I cooked up to show how to use Golang's text/template package.

It is meant to be followed using my Medium blog post.

To run the examples:

  • Make sure you have go-lang installed
  • Clone this repo
  • Cd into an example
  • Run go run zoo.go

Each example contains:

  • zoo.go: containing the actual logic for generating the template
  • zoo.tmpl: contains the template

The examples consist of:

  • Example 1: Creating a Template from a Golang Object
  • Example 2: Creating a Template Function
  • Example 3: Creating a Sub-Template

Note: Each example builds off the previous.

Thanks for checking it out!!

About

GoLang Templating Made Easy

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages