From 57a8ec74ce212843bb700c828d99a9c790819f95 Mon Sep 17 00:00:00 2001 From: yosssi Date: Mon, 12 May 2014 13:59:00 +0900 Subject: [PATCH] Add `AssetNames` function which returns the names of the assets. --- toc.go | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/toc.go b/toc.go index 0bd50da..5e4d982 100644 --- a/toc.go +++ b/toc.go @@ -39,6 +39,15 @@ func Asset(name string) ([]byte, error) { return nil, fmt.Errorf("Asset %%s not found", name) } +// AssetNames returns the names of the assets. +func AssetNames() []string { + names := make([]string, 0, len(_bindata)) + for name, _ := range _bindata { + names= append(names, name) + } + return names +} + // _bindata is a table, holding each asset generator, mapped to its name. var _bindata = map[string] func() ([]byte, error) { `)