Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/cyberdelia/templates
Bundle templates
https://github.com/cyberdelia/templates
Last synced: 5 days ago
JSON representation
Bundle templates
- Host: GitHub
- URL: https://github.com/cyberdelia/templates
- Owner: cyberdelia
- License: mit
- Created: 2014-03-05T01:48:51.000Z (over 10 years ago)
- Default Branch: master
- Last Pushed: 2021-08-07T23:48:25.000Z (over 3 years ago)
- Last Synced: 2024-06-18T18:43:12.292Z (5 months ago)
- Language: Go
- Homepage: https://pkg.go.dev/github.com/cyberdelia/templates
- Size: 4.88 KB
- Stars: 17
- Watchers: 2
- Forks: 2
- Open Issues: 1
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
⚠️ This library is now obsolete, please use: https://golang.org/pkg/embed/
# Templates
Templates allows you to bundle file template in your binary.
## Installation
To install simply go get it:
```
$ go get github.com/cyberdelia/templates
```## Usage
Generate the package:
```
$ templates -s templates/ > templates/templates.go
```Use it in your code:
```
template = template.Must(templates.Parse(nil))
```Or using ``go generate``:
```
//go:generate templates -s templates/ -o templates/templates.go
```