Skip to content

Commit

Permalink
codegen: use standard header for generated files
Browse files Browse the repository at this point in the history
Use the standard header in generated Go sources.
See https://go.dev/s/generatedcode.
  • Loading branch information
dolmen committed Jul 2, 2023
1 parent f97607b commit e8c7a91
Show file tree
Hide file tree
Showing 5 changed files with 6 additions and 20 deletions.
6 changes: 2 additions & 4 deletions _codegen/main.go
Original file line number Diff line number Diff line change
Expand Up @@ -297,10 +297,8 @@ func (f *testFunc) CommentWithoutT(receiver string) string {
return strings.Replace(f.Comment(), search, replace, -1)
}

var headerTemplate = `/*
* CODE GENERATED AUTOMATICALLY WITH github.com/stretchr/testify/_codegen
* THIS FILE MUST NOT BE EDITED BY HAND
*/
// Standard header https://go.dev/s/generatedcode.
var headerTemplate = `// Code generated with github.com/stretchr/testify/_codegen; DO NOT EDIT.
package {{.Name}}
Expand Down
5 changes: 1 addition & 4 deletions assert/assertion_format.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions assert/assertion_forward.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions require/require.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 1 addition & 4 deletions require/require_forward.go

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

0 comments on commit e8c7a91

Please sign in to comment.