Amends README with a note on how to access generated asset data.

pull/4/head v3.0.5
Jim Teeuwen 2014-01-29 12:43:10 +01:00
parent e87a807885
commit 1c1928d3b6
1 changed files with 13 additions and 0 deletions

View File

@ -48,6 +48,19 @@ output examples from the assets in `testdata/in`. Each example uses different
command line options.
### Accessing an asset
To access asset data, we use the `Asset(string) []byte` function which
is included in the generated output.
data := Asset("pub/style/foo.css")
if len(data) == 0 {
// Asset was not found.
}
// use asset data
### Debug vs Release builds
When invoking the program with the `-debug` flag, the generated code does