Archived
1
0

complete rewrite, added basic documentation

This commit is contained in:
2019-12-28 10:23:14 -09:00
committed by Christopher Ramey
parent 1d10f488b0
commit 0bfc3ce4b0
2 changed files with 90 additions and 85 deletions

View File

@ -0,0 +1,28 @@
togo
====
togo converts files to Go source code as a byte array.
togo is based on (but is a complete rewrite of)
[Franco Lazzarino's togo](https://github.com/flazz/togo).
usage
-----
togo is designed to be embedded in your Go project for a dependency free
way to manage assets.
First, copy `main.go` from togo into a subdirectory in your
project (for example, a subdirectory named `togo`.)
Next, add comments to indicate to go generate that you wish to run
your local copy of togo to build assets.
//go:generate go run ./togo -n Favicon_ico -i assets/favicon.ico -p static -o static/favicon_ico.go
togo takes some basic arguments:
Argument | Description
-------- | -----------
-p | generated package name
-n | generated variable name
-i | input file name
-o | output file name