Skip to content

Generate code marker according golang docs #397

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
wants to merge 1 commit into
base: master
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions printer/print.go
Original file line number Diff line number Diff line change
Expand Up @@ -115,13 +115,13 @@ func generate(f *parse.FileSet, mode gen.Method) (*bytes.Buffer, *bytes.Buffer,
}

func writePkgHeader(b *bytes.Buffer, name string) {
b.WriteString("package ")
b.WriteString(name)
b.WriteByte('\n')
// write generated code marker
// https://github.com/tinylib/msgp/issues/229
// https://golang.org/s/generatedcode
b.WriteString("// Code generated by github.com/tinylib/msgp DO NOT EDIT.\n\n")
b.WriteString("package ")
b.WriteString(name)
b.WriteString("\n\n")
}

func writeImportHeader(b *bytes.Buffer, imports ...string) {
Expand Down
Loading