Amends README with a note on how to access generated asset data.
This commit is contained in:
parent
e87a807885
commit
1c1928d3b6
13
README.md
13
README.md
|
@ -48,6 +48,19 @@ output examples from the assets in `testdata/in`. Each example uses different
|
||||||
command line options.
|
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
|
### Debug vs Release builds
|
||||||
|
|
||||||
When invoking the program with the `-debug` flag, the generated code does
|
When invoking the program with the `-debug` flag, the generated code does
|
||||||
|
|
Loading…
Reference in New Issue
Block a user