Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/freeformz/go-templates
Go Template Examples
https://github.com/freeformz/go-templates
Last synced: 7 days ago
JSON representation
Go Template Examples
- Host: GitHub
- URL: https://github.com/freeformz/go-templates
- Owner: freeformz
- Created: 2019-06-25T23:20:42.000Z (over 5 years ago)
- Default Branch: master
- Last Pushed: 2019-06-25T23:37:48.000Z (over 5 years ago)
- Last Synced: 2024-12-24T06:47:38.501Z (10 days ago)
- Language: Go
- Size: 2.93 KB
- Stars: 0
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
Awesome Lists containing this project
README
# GO Template Examples
## Shared templates
```console
$ go run ./shared
Template from a.gotmpl is named "a.gotmpl"
Template from b.gotmpl is named "b.gotmpl"
Template defined inside of b.gotmpl is named "bb"
Output of Executing 'a'
-------------------------------------------template "a.gotmpl" text
template "bb" text (inside of "b.gotmpl")
template "b.gotmpl" text
Output of Executing 'a' the second time
-------------------------------------------template "a.gotmpl" text
template "bb" text (inside of "b.gotmpl")
template "b.gotmpl" text
```
Note: Peek inside of ["./shared/templates/a.gotmpl"](https://github.com/freeformz/go-templates/blob/master/shared/templates/a.gotmpl)