Fixes some minor translation issues.
This commit is contained in:
parent
7125d6f515
commit
efd0c57cfd
|
@ -199,9 +199,7 @@ func compressed_memcopy(w io.Writer, asset *Asset, r io.Reader) {
|
|||
func uncompressed_nomemcopy(w io.Writer, asset *Asset, r io.Reader) {
|
||||
fmt.Fprintf(w, `var _%s = "`, asset.Func)
|
||||
|
||||
gz := gzip.NewWriter(&StringWriter{Writer: w})
|
||||
io.Copy(gz, r)
|
||||
gz.Close()
|
||||
io.Copy(&StringWriter{Writer: w}, r)
|
||||
|
||||
fmt.Fprintf(w, `"
|
||||
|
||||
|
|
58
testdata/out/bindata_debug.go
vendored
58
testdata/out/bindata_debug.go
vendored
|
@ -1,58 +0,0 @@
|
|||
// +build !release
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"io"
|
||||
"log"
|
||||
"os"
|
||||
)
|
||||
|
||||
// bindata_read reads the given file from disk.
|
||||
// It panics if anything went wrong.
|
||||
func bindata_read(path, name string) []byte {
|
||||
fd, err := os.Open(path)
|
||||
if err != nil {
|
||||
log.Fatalf("Read %s: %v", name, err)
|
||||
}
|
||||
|
||||
defer fd.Close()
|
||||
|
||||
var buf bytes.Buffer
|
||||
_, err = io.Copy(&buf, fd)
|
||||
if err != nil {
|
||||
log.Fatalf("Read %s: %v", name, err)
|
||||
}
|
||||
|
||||
return buf.Bytes()
|
||||
}
|
||||
|
||||
func testdata_in_b_test_asset() []byte {
|
||||
return bindata_read(
|
||||
"/a/code/go/src/github.com/jteeuwen/go-bindata/testdata/in/b/test.asset",
|
||||
"../testdata/in/b/test.asset",
|
||||
)
|
||||
}
|
||||
|
||||
func testdata_in_test_asset() []byte {
|
||||
return bindata_read(
|
||||
"/a/code/go/src/github.com/jteeuwen/go-bindata/testdata/in/test.asset",
|
||||
"../testdata/in/test.asset",
|
||||
)
|
||||
}
|
||||
|
||||
func testdata_in_a_test_asset() []byte {
|
||||
return bindata_read(
|
||||
"/a/code/go/src/github.com/jteeuwen/go-bindata/testdata/in/a/test.asset",
|
||||
"../testdata/in/a/test.asset",
|
||||
)
|
||||
}
|
||||
|
||||
func testdata_in_c_test_asset() []byte {
|
||||
return bindata_read(
|
||||
"/a/code/go/src/github.com/jteeuwen/go-bindata/testdata/in/c/test.asset",
|
||||
"../testdata/in/c/test.asset",
|
||||
)
|
||||
}
|
||||
|
57
testdata/out/bindata_release.go
vendored
57
testdata/out/bindata_release.go
vendored
|
@ -1,57 +0,0 @@
|
|||
// +build release
|
||||
|
||||
package main
|
||||
|
||||
|
||||
import (
|
||||
"reflect"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
func bindata_read(data, name string) []byte {
|
||||
var empty [0]byte
|
||||
sx := (*reflect.StringHeader)(unsafe.Pointer(&data))
|
||||
b := empty[:]
|
||||
bx := (*reflect.SliceHeader)(unsafe.Pointer(&b))
|
||||
bx.Data = sx.Data
|
||||
bx.Len = len(data)
|
||||
bx.Cap = bx.Len
|
||||
return b
|
||||
}
|
||||
|
||||
var _testdata_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 testdata_in_b_test_asset() []byte {
|
||||
return bindata_read(
|
||||
_testdata_in_b_test_asset,
|
||||
"../testdata/in/b/test.asset",
|
||||
)
|
||||
}
|
||||
|
||||
var _testdata_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 testdata_in_test_asset() []byte {
|
||||
return bindata_read(
|
||||
_testdata_in_test_asset,
|
||||
"../testdata/in/test.asset",
|
||||
)
|
||||
}
|
||||
|
||||
var _testdata_in_a_test_asset = "\x1f\x8b\x08\x00\x00\x09\x6e\x88\x00\xff\x2a\x4e\xcc\x2d\xc8\x49\x55\x48\xcb\xcc\x49\xe5\x02\x04\x00\x00\xff\xff\xda\x3d\x49\xdd\x0c\x00\x00\x00"
|
||||
|
||||
func testdata_in_a_test_asset() []byte {
|
||||
return bindata_read(
|
||||
_testdata_in_a_test_asset,
|
||||
"../testdata/in/a/test.asset",
|
||||
)
|
||||
}
|
||||
|
||||
var _testdata_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 testdata_in_c_test_asset() []byte {
|
||||
return bindata_read(
|
||||
_testdata_in_c_test_asset,
|
||||
"../testdata/in/c/test.asset",
|
||||
)
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user