testify icon indicating copy to clipboard operation
testify copied to clipboard

Change generated header comment according Go standard

Open alexandear opened this issue 3 years ago • 0 comments

Summary

This PR changes generated header comment to conform Go standard's regexp: ^// Code generated .* DO NOT EDIT\.$.

Changes

  • Edit headerTemplate in _codegen/main.go.
  • Run go generate ./....

Motivation

In Go, we have the standard comment line that marks machine-generated files. From the official documentation:

To convey to humans and machine tools that code is generated, generated source should have a line that matches the following regular expression (in Go syntax):

^// Code generated .* DO NOT EDIT\.$

See the discussion and final agreement.

alexandear avatar Feb 02 '23 10:02 alexandear