Fixes formatting of various generated outputs to be

more compatible with `go fmt`. This partially addresses
issue #34

Signed-off-by: Jim Teeuwen <jimteeuwen@gmail.com>
pull/4/head
Jim Teeuwen 2014-05-28 14:43:02 +02:00
parent 394d5b27c0
commit 17800c65a0
3 changed files with 23 additions and 24 deletions

View File

@ -52,14 +52,14 @@ func bindata_read(path, name string) ([]byte, error) {
// A debug entry is simply a function which reads the asset from
// the original file (e.g.: from disk).
func writeDebugAsset(w io.Writer, asset *Asset) error {
_, err := fmt.Fprintf(w, `
// %s reads file data from disk. It returns an error on failure.
_, err := fmt.Fprintf(w, `// %s reads file data from disk. It returns an error on failure.
func %s() ([]byte, error) {
return bindata_read(
%q,
%q,
)
}
`, asset.Func, asset.Func, asset.Path, asset.Name)
return err
}

5
toc.go
View File

@ -28,8 +28,7 @@ func writeTOC(w io.Writer, toc []Asset) error {
// writeTOCHeader writes the table of contents file header.
func writeTOCHeader(w io.Writer) error {
_, err := fmt.Fprintf(w, `
// Asset loads and returns the asset for the given name.
_, err := fmt.Fprintf(w, `// Asset loads and returns the asset for the given name.
// It returns an error if the asset could not be found or
// could not be loaded.
func Asset(name string) ([]byte, error) {
@ -50,7 +49,7 @@ func AssetNames() []string {
}
// _bindata is a table, holding each asset generator, mapped to its name.
var _bindata = map[string] func() ([]byte, error) {
var _bindata = map[string]func() ([]byte, error){
`)
return err
}