This commit is contained in:
Tamir Duberstein 2015-05-11 15:46:01 -04:00
parent ba26659a34
commit 6b468a429a
6 changed files with 58 additions and 58 deletions

View File

@ -237,25 +237,25 @@ func AssetDir(name string) ([]string, error) {
return rv, nil
}
type _bintree_t struct {
type bintree struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
Children map[string]*bintree
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"in": &_bintree_t{nil, map[string]*_bintree_t{
"a": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
var _bintree = &bintree{nil, map[string]*bintree{
"in": &bintree{nil, map[string]*bintree{
"a": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
}},
}},
"b": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
"b": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
}},
}},
"c": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
"c": &bintree{nil, map[string]*bintree{
"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{
}},
}},
}}

View File

@ -247,25 +247,25 @@ func AssetDir(name string) ([]string, error) {
return rv, nil
}
type _bintree_t struct {
type bintree struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
Children map[string]*bintree
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"in": &_bintree_t{nil, map[string]*_bintree_t{
"a": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
var _bintree = &bintree{nil, map[string]*bintree{
"in": &bintree{nil, map[string]*bintree{
"a": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
}},
}},
"b": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
"b": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
}},
}},
"c": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
"c": &bintree{nil, map[string]*bintree{
"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
View File

@ -188,25 +188,25 @@ func AssetDir(name string) ([]string, error) {
return rv, nil
}
type _bintree_t struct {
type bintree struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
Children map[string]*bintree
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"in": &_bintree_t{nil, map[string]*_bintree_t{
"a": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
var _bintree = &bintree{nil, map[string]*bintree{
"in": &bintree{nil, map[string]*bintree{
"a": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
}},
}},
"b": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
"b": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
}},
}},
"c": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
"c": &bintree{nil, map[string]*bintree{
"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{
}},
}},
}}

View File

@ -205,25 +205,25 @@ func AssetDir(name string) ([]string, error) {
return rv, nil
}
type _bintree_t struct {
type bintree struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
Children map[string]*bintree
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"in": &_bintree_t{nil, map[string]*_bintree_t{
"a": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
var _bintree = &bintree{nil, map[string]*bintree{
"in": &bintree{nil, map[string]*bintree{
"a": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
}},
}},
"b": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
"b": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
}},
}},
"c": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
"c": &bintree{nil, map[string]*bintree{
"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{
}},
}},
}}

View File

@ -227,25 +227,25 @@ func AssetDir(name string) ([]string, error) {
return rv, nil
}
type _bintree_t struct {
type bintree struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
Children map[string]*bintree
}
var _bintree = &_bintree_t{nil, map[string]*_bintree_t{
"in": &_bintree_t{nil, map[string]*_bintree_t{
"a": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_a_test_asset, map[string]*_bintree_t{
var _bintree = &bintree{nil, map[string]*bintree{
"in": &bintree{nil, map[string]*bintree{
"a": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_a_test_asset, map[string]*bintree{
}},
}},
"b": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_b_test_asset, map[string]*_bintree_t{
"b": &bintree{nil, map[string]*bintree{
"test.asset": &bintree{in_b_test_asset, map[string]*bintree{
}},
}},
"c": &_bintree_t{nil, map[string]*_bintree_t{
"test.asset": &_bintree_t{in_c_test_asset, map[string]*_bintree_t{
"c": &bintree{nil, map[string]*bintree{
"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
View File

@ -53,7 +53,7 @@ func (root *assetTree) funcOrNil() string {
}
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
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 {
_, err := fmt.Fprint(w, `type _bintree_t struct {
_, err := fmt.Fprint(w, `type bintree struct {
Func func() (*asset, error)
Children map[string]*_bintree_t
Children map[string]*bintree
}
var _bintree = `)
root.writeGoMap(w, 0)