https://github.com/setekhid/grandet
another golang assets handler, I made this package just because the others are already dead, and I'm trying to eat my own dogshit...
https://github.com/setekhid/grandet
Last synced: 5 months ago
JSON representation
another golang assets handler, I made this package just because the others are already dead, and I'm trying to eat my own dogshit...
- Host: GitHub
- URL: https://github.com/setekhid/grandet
- Owner: setekhid
- License: bsd-3-clause
- Created: 2017-06-29T09:40:23.000Z (almost 9 years ago)
- Default Branch: master
- Last Pushed: 2017-09-30T05:34:46.000Z (over 8 years ago)
- Last Synced: 2024-06-20T08:03:35.934Z (about 2 years ago)
- Language: Go
- Homepage:
- Size: 35.2 KB
- Stars: 2
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# grandet
[](https://godoc.org/github.com/setekhid/grandet) [](https://goreportcard.com/report/github.com/setekhid/grandet)
another golang assets handler, I made this just because the other solutions are
already dead.
# usage
```shell
go get github.com/setekhid/grandet/grandet
grandet \
-i github.com/setekhid/grandet/assets \
-d $GOPATH/src/github.com/setekhid/grandet/assets \
$GOPATH/src/github.com/setekhid/grandet/assets/asset.go.tmpl \
$GOPATH/src/github.com/setekhid/grandet/assets/grandet.go.tmpl
# gofmt as you like
```
```golang
package assets
func init() {
// regist all local assets
(&grandetAssets{}).registAssets()
}
```
```golang
package main
import (
"github.com/setekhid/grandet/assets"
"githbu.com/setekhid/grandet/pkg/http"
)
func main() {
content := assets.Grandet.Asset("asset.go.tmpl")
_ = content
file := http.Fs.Open("/github.com/setekhid/grandet/assets/asset.go.tmpl")
_ = file
}
```
# license
this project is under bsd 3-clause license, see `LICENSE` file