From ffff2535241e1c2c4bb133677d7614f20e05790a Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 11 May 2015 15:42:14 -0400 Subject: [PATCH] bindataRead --- debug.go | 6 +++--- release.go | 12 ++++++------ testdata/out/compress-memcopy.go | 10 +++++----- testdata/out/compress-nomemcopy.go | 10 +++++----- testdata/out/debug.go | 12 ++++++------ testdata/out/nocompress-nomemcopy.go | 10 +++++----- 6 files changed, 30 insertions(+), 30 deletions(-) diff --git a/debug.go b/debug.go index 5d96e9d..87e52c6 100644 --- a/debug.go +++ b/debug.go @@ -38,8 +38,8 @@ func writeDebugHeader(w io.Writer) error { "path/filepath" ) -// bindata_read reads the given file from disk. It returns an error on failure. -func bindata_read(path, name string) ([]byte, error) { +// bindataRead reads the given file from disk. It returns an error on failure. +func bindataRead(path, name string) ([]byte, error) { buf, err := ioutil.ReadFile(path) if err != nil { err = fmt.Errorf("Error reading asset %%s at %%s: %%v", name, path, err) @@ -69,7 +69,7 @@ func writeDebugAsset(w io.Writer, c *Config, asset *Asset) error { func %s() (*asset, error) { path := %s name := %q - bytes, err := bindata_read(path, name) + bytes, err := bindataRead(path, name) if err != nil { return nil, err } diff --git a/release.go b/release.go index f97c2cf..cd9945e 100644 --- a/release.go +++ b/release.go @@ -113,7 +113,7 @@ func header_compressed_nomemcopy(w io.Writer) error { "path/filepath" ) -func bindata_read(data, name string) ([]byte, error) { +func bindataRead(data, name string) ([]byte, error) { var empty [0]byte sx := (*reflect.StringHeader)(unsafe.Pointer(&data)) b := empty[:] @@ -159,7 +159,7 @@ func header_compressed_memcopy(w io.Writer) error { "path/filepath" ) -func bindata_read(data []byte, name string) ([]byte, error) { +func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { return nil, fmt.Errorf("Read %%q: %%v", name, err) @@ -196,7 +196,7 @@ func header_uncompressed_nomemcopy(w io.Writer) error { "path/filepath" ) -func bindata_read(data, name string) ([]byte, error) { +func bindataRead(data, name string) ([]byte, error) { var empty [0]byte sx := (*reflect.StringHeader)(unsafe.Pointer(&data)) b := empty[:] @@ -278,7 +278,7 @@ func compressed_nomemcopy(w io.Writer, asset *Asset, r io.Reader) error { _, err = fmt.Fprintf(w, `" func %s_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _%s, %q, ) @@ -305,7 +305,7 @@ func compressed_memcopy(w io.Writer, asset *Asset, r io.Reader) error { _, err = fmt.Fprintf(w, `") func %s_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _%s, %q, ) @@ -329,7 +329,7 @@ func uncompressed_nomemcopy(w io.Writer, asset *Asset, r io.Reader) error { _, err = fmt.Fprintf(w, `" func %s_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _%s, %q, ) diff --git a/testdata/out/compress-memcopy.go b/testdata/out/compress-memcopy.go index 5964ed6..dfdb2cf 100644 --- a/testdata/out/compress-memcopy.go +++ b/testdata/out/compress-memcopy.go @@ -13,7 +13,7 @@ import ( "path/filepath" ) -func bindata_read(data []byte, name string) ([]byte, error) { +func bindataRead(data []byte, name string) ([]byte, error) { gz, err := gzip.NewReader(bytes.NewBuffer(data)) if err != nil { return nil, fmt.Errorf("Read %q: %v", name, err) @@ -67,7 +67,7 @@ func (fi bindata_file_info) Sys() interface{} { var _in_a_test_asset = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00") func in_a_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_a_test_asset, "in/a/test.asset", ) @@ -87,7 +87,7 @@ func in_a_test_asset() (*asset, error) { var _in_b_test_asset = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00") func in_b_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_b_test_asset, "in/b/test.asset", ) @@ -107,7 +107,7 @@ func in_b_test_asset() (*asset, error) { var _in_c_test_asset = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00") func in_c_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_c_test_asset, "in/c/test.asset", ) @@ -127,7 +127,7 @@ func in_c_test_asset() (*asset, error) { var _in_test_asset = []byte("\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00") func in_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_test_asset, "in/test.asset", ) diff --git a/testdata/out/compress-nomemcopy.go b/testdata/out/compress-nomemcopy.go index 19d5bdc..0b328d2 100644 --- a/testdata/out/compress-nomemcopy.go +++ b/testdata/out/compress-nomemcopy.go @@ -15,7 +15,7 @@ import ( "path/filepath" ) -func bindata_read(data, name string) ([]byte, error) { +func bindataRead(data, name string) ([]byte, error) { var empty [0]byte sx := (*reflect.StringHeader)(unsafe.Pointer(&data)) b := empty[:] @@ -77,7 +77,7 @@ func (fi bindata_file_info) Sys() interface{} { var _in_a_test_asset = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00" func in_a_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_a_test_asset, "in/a/test.asset", ) @@ -97,7 +97,7 @@ func in_a_test_asset() (*asset, error) { var _in_b_test_asset = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00" func in_b_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_b_test_asset, "in/b/test.asset", ) @@ -117,7 +117,7 @@ func in_b_test_asset() (*asset, error) { var _in_c_test_asset = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00" func in_c_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_c_test_asset, "in/c/test.asset", ) @@ -137,7 +137,7 @@ func in_c_test_asset() (*asset, error) { var _in_test_asset = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\xd2\xd7\x57\x28\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\x8a\x82\x8c\x85\x0f\x00\x00\x00" func in_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_test_asset, "in/test.asset", ) diff --git a/testdata/out/debug.go b/testdata/out/debug.go index 2538603..9e9ad76 100644 --- a/testdata/out/debug.go +++ b/testdata/out/debug.go @@ -9,8 +9,8 @@ import ( "path/filepath" ) -// bindata_read reads the given file from disk. It returns an error on failure. -func bindata_read(path, name string) ([]byte, error) { +// bindataRead reads the given file from disk. It returns an error on failure. +func bindataRead(path, name string) ([]byte, error) { buf, err := ioutil.ReadFile(path) if err != nil { err = fmt.Errorf("Error reading asset %s at %s: %v", name, path, err) @@ -27,7 +27,7 @@ type asset struct { func in_a_test_asset() (*asset, error) { path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/a/test.asset" name := "in/a/test.asset" - bytes, err := bindata_read(path, name) + bytes, err := bindataRead(path, name) if err != nil { return nil, err } @@ -45,7 +45,7 @@ func in_a_test_asset() (*asset, error) { func in_b_test_asset() (*asset, error) { path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/b/test.asset" name := "in/b/test.asset" - bytes, err := bindata_read(path, name) + bytes, err := bindataRead(path, name) if err != nil { return nil, err } @@ -63,7 +63,7 @@ func in_b_test_asset() (*asset, error) { func in_c_test_asset() (*asset, error) { path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/c/test.asset" name := "in/c/test.asset" - bytes, err := bindata_read(path, name) + bytes, err := bindataRead(path, name) if err != nil { return nil, err } @@ -81,7 +81,7 @@ func in_c_test_asset() (*asset, error) { func in_test_asset() (*asset, error) { path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/test.asset" name := "in/test.asset" - bytes, err := bindata_read(path, name) + bytes, err := bindataRead(path, name) if err != nil { return nil, err } diff --git a/testdata/out/nocompress-nomemcopy.go b/testdata/out/nocompress-nomemcopy.go index dcf199d..f9b23d1 100644 --- a/testdata/out/nocompress-nomemcopy.go +++ b/testdata/out/nocompress-nomemcopy.go @@ -12,7 +12,7 @@ import ( "path/filepath" ) -func bindata_read(data, name string) ([]byte, error) { +func bindataRead(data, name string) ([]byte, error) { var empty [0]byte sx := (*reflect.StringHeader)(unsafe.Pointer(&data)) b := empty[:] @@ -57,7 +57,7 @@ func (fi bindata_file_info) Sys() interface{} { var _in_a_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a" func in_a_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_a_test_asset, "in/a/test.asset", ) @@ -77,7 +77,7 @@ func in_a_test_asset() (*asset, error) { var _in_b_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a" func in_b_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_b_test_asset, "in/b/test.asset", ) @@ -97,7 +97,7 @@ func in_b_test_asset() (*asset, error) { var _in_c_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a" func in_c_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_c_test_asset, "in/c/test.asset", ) @@ -117,7 +117,7 @@ func in_c_test_asset() (*asset, error) { var _in_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a" func in_test_asset_bytes() ([]byte, error) { - return bindata_read( + return bindataRead( _in_test_asset, "in/test.asset", )