Merge pull request #82 from xDuck/master

Add conditional build tag to generated files
This commit is contained in:
Mark Bates 2020-04-03 10:58:08 -04:00 committed by GitHub
commit c028e66556
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 0 deletions

View File

@ -143,6 +143,7 @@ func Package(info here.Info, out string, decls parser.Decls) error {
defer f.Close() defer f.Close()
fmt.Fprintf(f, "// Code generated by pkger; DO NOT EDIT.\n\n") fmt.Fprintf(f, "// Code generated by pkger; DO NOT EDIT.\n\n")
fmt.Fprintf(f, "// +build !skippkger\n\n")
fmt.Fprintf(f, "package %s\n\n", c.Name) fmt.Fprintf(f, "package %s\n\n", c.Name)
fmt.Fprintf(f, "import (\n\t\"github.com/markbates/pkger\"\n\t") fmt.Fprintf(f, "import (\n\t\"github.com/markbates/pkger\"\n\t")
fmt.Fprintf(f, "\"github.com/markbates/pkger/pkging/mem\"\n)\n\n") fmt.Fprintf(f, "\"github.com/markbates/pkger/pkging/mem\"\n)\n\n")