From 1c1928d3b62dc79f5b35c32ae372a5fe69e9b4f1 Mon Sep 17 00:00:00 2001 From: Jim Teeuwen Date: Wed, 29 Jan 2014 12:43:10 +0100 Subject: [PATCH] Amends README with a note on how to access generated asset data. --- README.md | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/README.md b/README.md index b53c128..82fcdd5 100644 --- a/README.md +++ b/README.md @@ -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