Skip to content

Commit

Permalink
Merge pull request #10 from krhubert/master
Browse files Browse the repository at this point in the history
Satisfy gofmt + golint
  • Loading branch information
liweiv committed Apr 1, 2019
2 parents 41975c0 + 0561df6 commit 892c73e
Show file tree
Hide file tree
Showing 6 changed files with 7 additions and 7 deletions.
4 changes: 2 additions & 2 deletions convert.go
Original file line number Diff line number Diff line change
Expand Up @@ -50,7 +50,7 @@ func Translate(c *Config) error {
defer bfd.Flush()

// Write the header. This makes e.g. Github ignore diffs in generated files.
if _, err = fmt.Fprint(bfd, "// Code generated by go-bindata. (@generated) DO NOT EDIT.\n"); err != nil {
if _, err = fmt.Fprintf(bfd, "// Package %s Code generated by go-bindata. (@generated) DO NOT EDIT.\n", c.Package); err != nil {
return err
}
if _, err = fmt.Fprint(bfd, "// sources:\n"); err != nil {
Expand Down Expand Up @@ -109,7 +109,7 @@ func Translate(c *Config) error {
return writeRestore(bfd)
}

// Implement sort.Interface for []os.FileInfo based on Name()
// ByName implements sort.Interface for []os.FileInfo based on Name()
type ByName []os.FileInfo

func (v ByName) Len() int { return len(v) }
Expand Down
2 changes: 1 addition & 1 deletion testdata/out/compress-memcopy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by go-bindata.
// Package main Code generated by go-bindata.
// sources:
// in/a/test.asset
// in/b/test.asset
Expand Down
2 changes: 1 addition & 1 deletion testdata/out/compress-nomemcopy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by go-bindata.
// Package main Code generated by go-bindata.
// sources:
// in/a/test.asset
// in/b/test.asset
Expand Down
2 changes: 1 addition & 1 deletion testdata/out/debug.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by go-bindata.
// Package main Code generated by go-bindata.
// sources:
// in/a/test.asset
// in/b/test.asset
Expand Down
2 changes: 1 addition & 1 deletion testdata/out/nocompress-memcopy.go
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
// Code generated by go-bindata.
// Package main Code generated by go-bindata.
// sources:
// in/a/test.asset
// in/b/test.asset
Expand Down
2 changes: 1 addition & 1 deletion toc.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func getFillerSize(tokenIndex int, lengths []int, nident int) int {
}

func (root *assetTree) writeGoMap(w io.Writer, nident int) {
fmt.Fprintf(w, "&bintree{%s, map[string]*bintree{", root.funcOrNil())
fmt.Fprintf(w, "{%s, map[string]*bintree{", root.funcOrNil())

This comment has been minimized.

Copy link
@brandoncole

brandoncole Apr 1, 2019

Uh this doesn't compile - I'm getting this now:

go fmt ./...
runtime/assets.go:2241:16: expected operand, found '{'
runtime/assets.go:2535:2: expected ';', found 'if'
exit status 2

I have Go 1.12.

This comment has been minimized.

Copy link
@0verc1ocker

0verc1ocker Apr 1, 2019

This seems to be broken on Go 1.11 as well when pulling latest go-bindata.

This comment has been minimized.

Copy link
@jrasillo-boa

jrasillo-boa Apr 1, 2019

Having problems w/ go 1.11 as well, opened a new issue here but seems like go 1.12 is broken too


if len(root.Children) > 0 {
io.WriteString(w, "\n")
Expand Down

0 comments on commit 892c73e

Please sign in to comment.