camelCase instead of snake_case
This commit is contained in:
parent
4fc85e2b3c
commit
dfcf23b04e
20
convert.go
20
convert.go
|
@ -200,18 +200,22 @@ var regFuncName = regexp.MustCompile(`[^a-zA-Z0-9_]`)
|
||||||
// also compares against a known list of functions to
|
// also compares against a known list of functions to
|
||||||
// prevent conflict based on name translation.
|
// prevent conflict based on name translation.
|
||||||
func safeFunctionName(name string, knownFuncs map[string]int) string {
|
func safeFunctionName(name string, knownFuncs map[string]int) string {
|
||||||
|
var inBytes, outBytes []byte
|
||||||
|
|
||||||
name = strings.ToLower(name)
|
name = strings.ToLower(name)
|
||||||
name = regFuncName.ReplaceAllString(name, "_")
|
inBytes = []byte(name)
|
||||||
|
|
||||||
// Get rid of "__" instances for niceness.
|
for i := 0; i < len(inBytes); i++ {
|
||||||
for strings.Index(name, "__") > -1 {
|
if regFuncName.Match([]byte{inBytes[i]}) {
|
||||||
name = strings.Replace(name, "__", "_", -1)
|
i++
|
||||||
|
outBytes = append(outBytes, []byte(strings.ToUpper(string(inBytes[i])))...)
|
||||||
|
// bytes[i] = strings.ToUpper(string(byte))
|
||||||
|
} else {
|
||||||
|
outBytes = append(outBytes, inBytes[i])
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Leading underscores are silly (unless they prefix a digit (see below)).
|
name = string(outBytes)
|
||||||
for len(name) > 1 && name[0] == '_' {
|
|
||||||
name = name[1:]
|
|
||||||
}
|
|
||||||
|
|
||||||
// Identifier can't start with a digit.
|
// Identifier can't start with a digit.
|
||||||
if unicode.IsDigit(rune(name[0])) {
|
if unicode.IsDigit(rune(name[0])) {
|
||||||
|
|
10
release.go
10
release.go
|
@ -277,7 +277,7 @@ func compressed_nomemcopy(w io.Writer, asset *Asset, r io.Reader) error {
|
||||||
|
|
||||||
_, err = fmt.Fprintf(w, `"
|
_, err = fmt.Fprintf(w, `"
|
||||||
|
|
||||||
func %s_bytes() ([]byte, error) {
|
func %sBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_%s,
|
_%s,
|
||||||
%q,
|
%q,
|
||||||
|
@ -304,7 +304,7 @@ func compressed_memcopy(w io.Writer, asset *Asset, r io.Reader) error {
|
||||||
|
|
||||||
_, err = fmt.Fprintf(w, `")
|
_, err = fmt.Fprintf(w, `")
|
||||||
|
|
||||||
func %s_bytes() ([]byte, error) {
|
func %sBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_%s,
|
_%s,
|
||||||
%q,
|
%q,
|
||||||
|
@ -328,7 +328,7 @@ func uncompressed_nomemcopy(w io.Writer, asset *Asset, r io.Reader) error {
|
||||||
|
|
||||||
_, err = fmt.Fprintf(w, `"
|
_, err = fmt.Fprintf(w, `"
|
||||||
|
|
||||||
func %s_bytes() ([]byte, error) {
|
func %sBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_%s,
|
_%s,
|
||||||
%q,
|
%q,
|
||||||
|
@ -357,7 +357,7 @@ func uncompressed_memcopy(w io.Writer, asset *Asset, r io.Reader) error {
|
||||||
|
|
||||||
_, err = fmt.Fprintf(w, `)
|
_, err = fmt.Fprintf(w, `)
|
||||||
|
|
||||||
func %s_bytes() ([]byte, error) {
|
func %sBytes() ([]byte, error) {
|
||||||
return _%s, nil
|
return _%s, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -381,7 +381,7 @@ func asset_release_common(w io.Writer, c *Config, asset *Asset) error {
|
||||||
modTime = c.ModTime
|
modTime = c.ModTime
|
||||||
}
|
}
|
||||||
_, err = fmt.Fprintf(w, `func %s() (*asset, error) {
|
_, err = fmt.Fprintf(w, `func %s() (*asset, error) {
|
||||||
bytes, err := %s_bytes()
|
bytes, err := %sBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
|
56
testdata/out/compress-memcopy.go
vendored
56
testdata/out/compress-memcopy.go
vendored
|
@ -64,17 +64,17 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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")
|
var _inATestAsset = []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) {
|
func inATestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_a_test_asset,
|
_inATestAsset,
|
||||||
"in/a/test.asset",
|
"in/a/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_a_test_asset() (*asset, error) {
|
func inATestAsset() (*asset, error) {
|
||||||
bytes, err := in_a_test_asset_bytes()
|
bytes, err := inATestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -84,17 +84,17 @@ func in_a_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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")
|
var _inBTestAsset = []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) {
|
func inBTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_b_test_asset,
|
_inBTestAsset,
|
||||||
"in/b/test.asset",
|
"in/b/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_b_test_asset() (*asset, error) {
|
func inBTestAsset() (*asset, error) {
|
||||||
bytes, err := in_b_test_asset_bytes()
|
bytes, err := inBTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -104,17 +104,17 @@ func in_b_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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")
|
var _inCTestAsset = []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) {
|
func inCTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_c_test_asset,
|
_inCTestAsset,
|
||||||
"in/c/test.asset",
|
"in/c/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_c_test_asset() (*asset, error) {
|
func inCTestAsset() (*asset, error) {
|
||||||
bytes, err := in_c_test_asset_bytes()
|
bytes, err := inCTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -124,17 +124,17 @@ func in_c_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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")
|
var _inTestAsset = []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) {
|
func inTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_test_asset,
|
_inTestAsset,
|
||||||
"in/test.asset",
|
"in/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_test_asset() (*asset, error) {
|
func inTestAsset() (*asset, error) {
|
||||||
bytes, err := in_test_asset_bytes()
|
bytes, err := inTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -196,10 +196,10 @@ func AssetNames() []string {
|
||||||
|
|
||||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||||
var _bindata = map[string]func() (*asset, error){
|
var _bindata = map[string]func() (*asset, error){
|
||||||
"in/a/test.asset": in_a_test_asset,
|
"in/a/test.asset": inATestAsset,
|
||||||
"in/b/test.asset": in_b_test_asset,
|
"in/b/test.asset": inBTestAsset,
|
||||||
"in/c/test.asset": in_c_test_asset,
|
"in/c/test.asset": inCTestAsset,
|
||||||
"in/test.asset": in_test_asset,
|
"in/test.asset": inTestAsset,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssetDir returns the file names below a certain
|
// AssetDir returns the file names below a certain
|
||||||
|
@ -244,18 +244,18 @@ type bintree struct {
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &bintree{nil, map[string]*bintree{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &bintree{nil, map[string]*bintree{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inATestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &bintree{nil, map[string]*bintree{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inBTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &bintree{nil, map[string]*bintree{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inCTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
56
testdata/out/compress-nomemcopy.go
vendored
56
testdata/out/compress-nomemcopy.go
vendored
|
@ -74,17 +74,17 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
var _inATestAsset = "\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) {
|
func inATestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_a_test_asset,
|
_inATestAsset,
|
||||||
"in/a/test.asset",
|
"in/a/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_a_test_asset() (*asset, error) {
|
func inATestAsset() (*asset, error) {
|
||||||
bytes, err := in_a_test_asset_bytes()
|
bytes, err := inATestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -94,17 +94,17 @@ func in_a_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
var _inBTestAsset = "\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) {
|
func inBTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_b_test_asset,
|
_inBTestAsset,
|
||||||
"in/b/test.asset",
|
"in/b/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_b_test_asset() (*asset, error) {
|
func inBTestAsset() (*asset, error) {
|
||||||
bytes, err := in_b_test_asset_bytes()
|
bytes, err := inBTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -114,17 +114,17 @@ func in_b_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
var _inCTestAsset = "\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) {
|
func inCTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_c_test_asset,
|
_inCTestAsset,
|
||||||
"in/c/test.asset",
|
"in/c/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_c_test_asset() (*asset, error) {
|
func inCTestAsset() (*asset, error) {
|
||||||
bytes, err := in_c_test_asset_bytes()
|
bytes, err := inCTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -134,17 +134,17 @@ func in_c_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
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"
|
var _inTestAsset = "\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) {
|
func inTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_test_asset,
|
_inTestAsset,
|
||||||
"in/test.asset",
|
"in/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_test_asset() (*asset, error) {
|
func inTestAsset() (*asset, error) {
|
||||||
bytes, err := in_test_asset_bytes()
|
bytes, err := inTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -206,10 +206,10 @@ func AssetNames() []string {
|
||||||
|
|
||||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||||
var _bindata = map[string]func() (*asset, error){
|
var _bindata = map[string]func() (*asset, error){
|
||||||
"in/a/test.asset": in_a_test_asset,
|
"in/a/test.asset": inATestAsset,
|
||||||
"in/b/test.asset": in_b_test_asset,
|
"in/b/test.asset": inBTestAsset,
|
||||||
"in/c/test.asset": in_c_test_asset,
|
"in/c/test.asset": inCTestAsset,
|
||||||
"in/test.asset": in_test_asset,
|
"in/test.asset": inTestAsset,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssetDir returns the file names below a certain
|
// AssetDir returns the file names below a certain
|
||||||
|
@ -254,18 +254,18 @@ type bintree struct {
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &bintree{nil, map[string]*bintree{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &bintree{nil, map[string]*bintree{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inATestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &bintree{nil, map[string]*bintree{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inBTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &bintree{nil, map[string]*bintree{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inCTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
32
testdata/out/debug.go
vendored
32
testdata/out/debug.go
vendored
|
@ -23,8 +23,8 @@ type asset struct {
|
||||||
info os.FileInfo
|
info os.FileInfo
|
||||||
}
|
}
|
||||||
|
|
||||||
// in_a_test_asset reads file data from disk. It returns an error on failure.
|
// inATestAsset reads file data from disk. It returns an error on failure.
|
||||||
func in_a_test_asset() (*asset, error) {
|
func inATestAsset() (*asset, error) {
|
||||||
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/a/test.asset"
|
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/a/test.asset"
|
||||||
name := "in/a/test.asset"
|
name := "in/a/test.asset"
|
||||||
bytes, err := bindataRead(path, name)
|
bytes, err := bindataRead(path, name)
|
||||||
|
@ -41,8 +41,8 @@ func in_a_test_asset() (*asset, error) {
|
||||||
return a, err
|
return a, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// in_b_test_asset reads file data from disk. It returns an error on failure.
|
// inBTestAsset reads file data from disk. It returns an error on failure.
|
||||||
func in_b_test_asset() (*asset, error) {
|
func inBTestAsset() (*asset, error) {
|
||||||
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/b/test.asset"
|
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/b/test.asset"
|
||||||
name := "in/b/test.asset"
|
name := "in/b/test.asset"
|
||||||
bytes, err := bindataRead(path, name)
|
bytes, err := bindataRead(path, name)
|
||||||
|
@ -59,8 +59,8 @@ func in_b_test_asset() (*asset, error) {
|
||||||
return a, err
|
return a, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// in_c_test_asset reads file data from disk. It returns an error on failure.
|
// inCTestAsset reads file data from disk. It returns an error on failure.
|
||||||
func in_c_test_asset() (*asset, error) {
|
func inCTestAsset() (*asset, error) {
|
||||||
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/c/test.asset"
|
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/c/test.asset"
|
||||||
name := "in/c/test.asset"
|
name := "in/c/test.asset"
|
||||||
bytes, err := bindataRead(path, name)
|
bytes, err := bindataRead(path, name)
|
||||||
|
@ -77,8 +77,8 @@ func in_c_test_asset() (*asset, error) {
|
||||||
return a, err
|
return a, err
|
||||||
}
|
}
|
||||||
|
|
||||||
// in_test_asset reads file data from disk. It returns an error on failure.
|
// inTestAsset reads file data from disk. It returns an error on failure.
|
||||||
func in_test_asset() (*asset, error) {
|
func inTestAsset() (*asset, error) {
|
||||||
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/test.asset"
|
path := "/Users/tamird/src/go/src/github.com/jteeuwen/go-bindata/testdata/in/test.asset"
|
||||||
name := "in/test.asset"
|
name := "in/test.asset"
|
||||||
bytes, err := bindataRead(path, name)
|
bytes, err := bindataRead(path, name)
|
||||||
|
@ -147,10 +147,10 @@ func AssetNames() []string {
|
||||||
|
|
||||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||||
var _bindata = map[string]func() (*asset, error){
|
var _bindata = map[string]func() (*asset, error){
|
||||||
"in/a/test.asset": in_a_test_asset,
|
"in/a/test.asset": inATestAsset,
|
||||||
"in/b/test.asset": in_b_test_asset,
|
"in/b/test.asset": inBTestAsset,
|
||||||
"in/c/test.asset": in_c_test_asset,
|
"in/c/test.asset": inCTestAsset,
|
||||||
"in/test.asset": in_test_asset,
|
"in/test.asset": inTestAsset,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssetDir returns the file names below a certain
|
// AssetDir returns the file names below a certain
|
||||||
|
@ -195,18 +195,18 @@ type bintree struct {
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &bintree{nil, map[string]*bintree{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &bintree{nil, map[string]*bintree{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inATestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &bintree{nil, map[string]*bintree{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inBTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &bintree{nil, map[string]*bintree{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inCTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
56
testdata/out/nocompress-memcopy.go
vendored
56
testdata/out/nocompress-memcopy.go
vendored
|
@ -40,15 +40,15 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_a_test_asset = []byte(`// sample file
|
var _inATestAsset = []byte(`// sample file
|
||||||
`)
|
`)
|
||||||
|
|
||||||
func in_a_test_asset_bytes() ([]byte, error) {
|
func inATestAssetBytes() ([]byte, error) {
|
||||||
return _in_a_test_asset, nil
|
return _inATestAsset, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_a_test_asset() (*asset, error) {
|
func inATestAsset() (*asset, error) {
|
||||||
bytes, err := in_a_test_asset_bytes()
|
bytes, err := inATestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -58,15 +58,15 @@ func in_a_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_b_test_asset = []byte(`// sample file
|
var _inBTestAsset = []byte(`// sample file
|
||||||
`)
|
`)
|
||||||
|
|
||||||
func in_b_test_asset_bytes() ([]byte, error) {
|
func inBTestAssetBytes() ([]byte, error) {
|
||||||
return _in_b_test_asset, nil
|
return _inBTestAsset, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_b_test_asset() (*asset, error) {
|
func inBTestAsset() (*asset, error) {
|
||||||
bytes, err := in_b_test_asset_bytes()
|
bytes, err := inBTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -76,15 +76,15 @@ func in_b_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_c_test_asset = []byte(`// sample file
|
var _inCTestAsset = []byte(`// sample file
|
||||||
`)
|
`)
|
||||||
|
|
||||||
func in_c_test_asset_bytes() ([]byte, error) {
|
func inCTestAssetBytes() ([]byte, error) {
|
||||||
return _in_c_test_asset, nil
|
return _inCTestAsset, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_c_test_asset() (*asset, error) {
|
func inCTestAsset() (*asset, error) {
|
||||||
bytes, err := in_c_test_asset_bytes()
|
bytes, err := inCTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -94,15 +94,15 @@ func in_c_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_test_asset = []byte(`// sample file
|
var _inTestAsset = []byte(`// sample file
|
||||||
`)
|
`)
|
||||||
|
|
||||||
func in_test_asset_bytes() ([]byte, error) {
|
func inTestAssetBytes() ([]byte, error) {
|
||||||
return _in_test_asset, nil
|
return _inTestAsset, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_test_asset() (*asset, error) {
|
func inTestAsset() (*asset, error) {
|
||||||
bytes, err := in_test_asset_bytes()
|
bytes, err := inTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -164,10 +164,10 @@ func AssetNames() []string {
|
||||||
|
|
||||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||||
var _bindata = map[string]func() (*asset, error){
|
var _bindata = map[string]func() (*asset, error){
|
||||||
"in/a/test.asset": in_a_test_asset,
|
"in/a/test.asset": inATestAsset,
|
||||||
"in/b/test.asset": in_b_test_asset,
|
"in/b/test.asset": inBTestAsset,
|
||||||
"in/c/test.asset": in_c_test_asset,
|
"in/c/test.asset": inCTestAsset,
|
||||||
"in/test.asset": in_test_asset,
|
"in/test.asset": inTestAsset,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssetDir returns the file names below a certain
|
// AssetDir returns the file names below a certain
|
||||||
|
@ -212,18 +212,18 @@ type bintree struct {
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &bintree{nil, map[string]*bintree{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &bintree{nil, map[string]*bintree{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inATestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &bintree{nil, map[string]*bintree{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inBTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &bintree{nil, map[string]*bintree{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inCTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
56
testdata/out/nocompress-nomemcopy.go
vendored
56
testdata/out/nocompress-nomemcopy.go
vendored
|
@ -54,17 +54,17 @@ func (fi bindataFileInfo) Sys() interface{} {
|
||||||
return nil
|
return nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_a_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
var _inATestAsset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
||||||
|
|
||||||
func in_a_test_asset_bytes() ([]byte, error) {
|
func inATestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_a_test_asset,
|
_inATestAsset,
|
||||||
"in/a/test.asset",
|
"in/a/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_a_test_asset() (*asset, error) {
|
func inATestAsset() (*asset, error) {
|
||||||
bytes, err := in_a_test_asset_bytes()
|
bytes, err := inATestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -74,17 +74,17 @@ func in_a_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_b_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
var _inBTestAsset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
||||||
|
|
||||||
func in_b_test_asset_bytes() ([]byte, error) {
|
func inBTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_b_test_asset,
|
_inBTestAsset,
|
||||||
"in/b/test.asset",
|
"in/b/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_b_test_asset() (*asset, error) {
|
func inBTestAsset() (*asset, error) {
|
||||||
bytes, err := in_b_test_asset_bytes()
|
bytes, err := inBTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -94,17 +94,17 @@ func in_b_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_c_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
var _inCTestAsset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
||||||
|
|
||||||
func in_c_test_asset_bytes() ([]byte, error) {
|
func inCTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_c_test_asset,
|
_inCTestAsset,
|
||||||
"in/c/test.asset",
|
"in/c/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_c_test_asset() (*asset, error) {
|
func inCTestAsset() (*asset, error) {
|
||||||
bytes, err := in_c_test_asset_bytes()
|
bytes, err := inCTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -114,17 +114,17 @@ func in_c_test_asset() (*asset, error) {
|
||||||
return a, nil
|
return a, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
var _in_test_asset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
var _inTestAsset = "\x2f\x2f\x20\x73\x61\x6d\x70\x6c\x65\x20\x66\x69\x6c\x65\x0a"
|
||||||
|
|
||||||
func in_test_asset_bytes() ([]byte, error) {
|
func inTestAssetBytes() ([]byte, error) {
|
||||||
return bindataRead(
|
return bindataRead(
|
||||||
_in_test_asset,
|
_inTestAsset,
|
||||||
"in/test.asset",
|
"in/test.asset",
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
|
|
||||||
func in_test_asset() (*asset, error) {
|
func inTestAsset() (*asset, error) {
|
||||||
bytes, err := in_test_asset_bytes()
|
bytes, err := inTestAssetBytes()
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
}
|
}
|
||||||
|
@ -186,10 +186,10 @@ func AssetNames() []string {
|
||||||
|
|
||||||
// _bindata is a table, holding each asset generator, mapped to its name.
|
// _bindata is a table, holding each asset generator, mapped to its name.
|
||||||
var _bindata = map[string]func() (*asset, error){
|
var _bindata = map[string]func() (*asset, error){
|
||||||
"in/a/test.asset": in_a_test_asset,
|
"in/a/test.asset": inATestAsset,
|
||||||
"in/b/test.asset": in_b_test_asset,
|
"in/b/test.asset": inBTestAsset,
|
||||||
"in/c/test.asset": in_c_test_asset,
|
"in/c/test.asset": inCTestAsset,
|
||||||
"in/test.asset": in_test_asset,
|
"in/test.asset": inTestAsset,
|
||||||
}
|
}
|
||||||
|
|
||||||
// AssetDir returns the file names below a certain
|
// AssetDir returns the file names below a certain
|
||||||
|
@ -234,18 +234,18 @@ type bintree struct {
|
||||||
var _bintree = &bintree{nil, map[string]*bintree{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &bintree{nil, map[string]*bintree{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &bintree{nil, map[string]*bintree{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inATestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &bintree{nil, map[string]*bintree{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inBTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &bintree{nil, map[string]*bintree{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inCTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
"test.asset": &bintree{inTestAsset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
Loading…
Reference in New Issue
Block a user