Skip to content

Commit 89e7c37

Browse files
lebauceshuLhan
authored andcommitted
Make generated code pass gofmt -s
1 parent accfe6a commit 89e7c37

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

restore.go

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,6 @@ func _filePath(dir, name string) string {
5353
cannonicalName := strings.Replace(name, "\\", "/", -1)
5454
return filepath.Join(append([]string{dir}, strings.Split(cannonicalName, "/")...)...)
5555
}
56-
5756
`)
5857
return err
5958
}

toc.go

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -53,7 +53,10 @@ func (root *assetTree) funcOrNil() string {
5353
}
5454

5555
func (root *assetTree) writeGoMap(w io.Writer, nident int) {
56-
fmt.Fprintf(w, "&bintree{%s, map[string]*bintree{", root.funcOrNil())
56+
if nident == 0 {
57+
io.WriteString(w, "&bintree")
58+
}
59+
fmt.Fprintf(w, "{%s, map[string]*bintree{", root.funcOrNil())
5760

5861
if len(root.Children) > 0 {
5962
io.WriteString(w, "\n")
@@ -87,6 +90,7 @@ func (root *assetTree) WriteAsGoMap(w io.Writer) error {
8790
Func func() (*asset, error)
8891
Children map[string]*bintree
8992
}
93+
9094
var _bintree = `)
9195
root.writeGoMap(w, 0)
9296
return err

0 commit comments

Comments
 (0)