fixing the readme to indicate err return
from a test that I wrote in https://github.com/arschles/go-bindata-test, it looks like go-bindata generates an Asset(...) function that returns an error when the file isn't found
This commit is contained in:
parent
1743f47c01
commit
8f6e0a3425
|
@ -56,8 +56,8 @@ To ignore files, pass in regexes using -ignore, for example:
|
||||||
To access asset data, we use the `Asset(string) []byte` function which
|
To access asset data, we use the `Asset(string) []byte` function which
|
||||||
is included in the generated output.
|
is included in the generated output.
|
||||||
|
|
||||||
data := Asset("pub/style/foo.css")
|
data, err := Asset("pub/style/foo.css")
|
||||||
if len(data) == 0 {
|
if err != nil {
|
||||||
// Asset was not found.
|
// Asset was not found.
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue
Block a user