From 6b468a429ace578dc6ba98a13541dc2ebeb9d352 Mon Sep 17 00:00:00 2001 From: Tamir Duberstein Date: Mon, 11 May 2015 15:46:01 -0400 Subject: [PATCH] bintree --- testdata/out/compress-memcopy.go | 22 +++++++++++----------- testdata/out/compress-nomemcopy.go | 22 +++++++++++----------- testdata/out/debug.go | 22 +++++++++++----------- testdata/out/nocompress-memcopy.go | 22 +++++++++++----------- testdata/out/nocompress-nomemcopy.go | 22 +++++++++++----------- toc.go | 6 +++--- 6 files changed, 58 insertions(+), 58 deletions(-) diff --git a/testdata/out/compress-memcopy.go b/testdata/out/compress-memcopy.go index 4ac8498..6aa985c 100644 --- a/testdata/out/compress-memcopy.go +++ b/testdata/out/compress-memcopy.go @@ -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{ }}, }}, }} diff --git a/testdata/out/compress-nomemcopy.go b/testdata/out/compress-nomemcopy.go index e950e3b..eec352f 100644 --- a/testdata/out/compress-nomemcopy.go +++ b/testdata/out/compress-nomemcopy.go @@ -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{ }}, }}, }} diff --git a/testdata/out/debug.go b/testdata/out/debug.go index 3082c7d..bfe57bf 100644 --- a/testdata/out/debug.go +++ b/testdata/out/debug.go @@ -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{ }}, }}, }} diff --git a/testdata/out/nocompress-memcopy.go b/testdata/out/nocompress-memcopy.go index c8e8731..7748d52 100644 --- a/testdata/out/nocompress-memcopy.go +++ b/testdata/out/nocompress-memcopy.go @@ -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{ }}, }}, }} diff --git a/testdata/out/nocompress-nomemcopy.go b/testdata/out/nocompress-nomemcopy.go index d23326d..8b78ba5 100644 --- a/testdata/out/nocompress-nomemcopy.go +++ b/testdata/out/nocompress-nomemcopy.go @@ -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{ }}, }}, }} diff --git a/toc.go b/toc.go index 65d519c..663bc05 100644 --- a/toc.go +++ b/toc.go @@ -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)