Skip to content

Commit

Permalink
try to fix build on go1.10
Browse files Browse the repository at this point in the history
  • Loading branch information
kamilsk committed Nov 11, 2018
1 parent 2579866 commit 7ece618
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions cmd/generate/gen.go
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ import (
//go:generate gofmt -w parser_gen.go

const tpl = `
// +build go1.10
{{ if .BuildTags }}// +build{{ range .BuildTags }} {{ . }}{{ end }}{{ end }}
package main
Expand Down Expand Up @@ -318,5 +318,9 @@ func main() {
panic(err)
}
defer f.Close()
t.Execute(f, nil)
t.Execute(f, struct {
BuildTags []string
}{
BuildTags: []string{"go1.10"},
})
}

0 comments on commit 7ece618

Please sign in to comment.