bintree
This commit is contained in:
parent
ba26659a34
commit
6b468a429a
22
testdata/out/compress-memcopy.go
vendored
22
testdata/out/compress-memcopy.go
vendored
|
@ -237,25 +237,25 @@ func AssetDir(name string) ([]string, error) {
|
||||||
return rv, nil
|
return rv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type _bintree_t struct {
|
type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*_bintree_t
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &_bintree_t{nil, map[string]*_bintree_t{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &_bintree_t{nil, map[string]*_bintree_t{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &_bintree_t{nil, map[string]*_bintree_t{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &_bintree_t{nil, map[string]*_bintree_t{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &_bintree_t{in_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
22
testdata/out/compress-nomemcopy.go
vendored
22
testdata/out/compress-nomemcopy.go
vendored
|
@ -247,25 +247,25 @@ func AssetDir(name string) ([]string, error) {
|
||||||
return rv, nil
|
return rv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type _bintree_t struct {
|
type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*_bintree_t
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &_bintree_t{nil, map[string]*_bintree_t{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &_bintree_t{nil, map[string]*_bintree_t{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &_bintree_t{nil, map[string]*_bintree_t{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &_bintree_t{nil, map[string]*_bintree_t{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &_bintree_t{in_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
22
testdata/out/debug.go
vendored
22
testdata/out/debug.go
vendored
|
@ -188,25 +188,25 @@ func AssetDir(name string) ([]string, error) {
|
||||||
return rv, nil
|
return rv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type _bintree_t struct {
|
type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*_bintree_t
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &_bintree_t{nil, map[string]*_bintree_t{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &_bintree_t{nil, map[string]*_bintree_t{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &_bintree_t{nil, map[string]*_bintree_t{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &_bintree_t{nil, map[string]*_bintree_t{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &_bintree_t{in_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
22
testdata/out/nocompress-memcopy.go
vendored
22
testdata/out/nocompress-memcopy.go
vendored
|
@ -205,25 +205,25 @@ func AssetDir(name string) ([]string, error) {
|
||||||
return rv, nil
|
return rv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type _bintree_t struct {
|
type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*_bintree_t
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &_bintree_t{nil, map[string]*_bintree_t{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &_bintree_t{nil, map[string]*_bintree_t{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &_bintree_t{nil, map[string]*_bintree_t{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &_bintree_t{nil, map[string]*_bintree_t{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &_bintree_t{in_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
22
testdata/out/nocompress-nomemcopy.go
vendored
22
testdata/out/nocompress-nomemcopy.go
vendored
|
@ -227,25 +227,25 @@ func AssetDir(name string) ([]string, error) {
|
||||||
return rv, nil
|
return rv, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
type _bintree_t struct {
|
type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*_bintree_t
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
|
var _bintree = &bintree{nil, map[string]*bintree{
|
||||||
"in": &_bintree_t{nil, map[string]*_bintree_t{
|
"in": &bintree{nil, map[string]*bintree{
|
||||||
"a": &_bintree_t{nil, map[string]*_bintree_t{
|
"a": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"b": &_bintree_t{nil, map[string]*_bintree_t{
|
"b": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"c": &_bintree_t{nil, map[string]*_bintree_t{
|
"c": &bintree{nil, map[string]*bintree{
|
||||||
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_c_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
"test.asset": &_bintree_t{in_test_asset, map[string]*_bintree_t{
|
"test.asset": &bintree{in_test_asset, map[string]*bintree{
|
||||||
}},
|
}},
|
||||||
}},
|
}},
|
||||||
}}
|
}}
|
||||||
|
|
6
toc.go
6
toc.go
|
@ -53,7 +53,7 @@ func (root *assetTree) funcOrNil() string {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (root *assetTree) writeGoMap(w io.Writer, nident int) {
|
func (root *assetTree) writeGoMap(w io.Writer, nident int) {
|
||||||
fmt.Fprintf(w, "&_bintree_t{%s, map[string]*_bintree_t{\n", root.funcOrNil())
|
fmt.Fprintf(w, "&bintree{%s, map[string]*bintree{\n", root.funcOrNil())
|
||||||
|
|
||||||
// Sort to make output stable between invocations
|
// Sort to make output stable between invocations
|
||||||
filenames := make([]string, len(root.Children))
|
filenames := make([]string, len(root.Children))
|
||||||
|
@ -78,9 +78,9 @@ func (root *assetTree) writeGoMap(w io.Writer, nident int) {
|
||||||
}
|
}
|
||||||
|
|
||||||
func (root *assetTree) WriteAsGoMap(w io.Writer) error {
|
func (root *assetTree) WriteAsGoMap(w io.Writer) error {
|
||||||
_, err := fmt.Fprint(w, `type _bintree_t struct {
|
_, err := fmt.Fprint(w, `type bintree struct {
|
||||||
Func func() (*asset, error)
|
Func func() (*asset, error)
|
||||||
Children map[string]*_bintree_t
|
Children map[string]*bintree
|
||||||
}
|
}
|
||||||
var _bintree = `)
|
var _bintree = `)
|
||||||
root.writeGoMap(w, 0)
|
root.writeGoMap(w, 0)
|
||||||
|
|
Loading…
Reference in New Issue
Block a user