Fix go_marshal Example name.

There is a canonical naming convention for Examples, which are checked
by analyzers. This must be fixed since adding exceptions for generated
code will be more challenging.
This commit is contained in:
Adin Scannell
2020-03-25 16:18:05 -07:00
parent 3afbe5461a
commit d440fe0613
+1 -1
View File
@@ -413,7 +413,7 @@ func (g *Generator) writeTests(ts []*testGenerator) error {
// empty example instead.
if len(ts) == 0 {
b.reset()
b.emit("func ExampleEmptyTestSuite() {\n")
b.emit("func Example() {\n")
b.inIndent(func() {
b.emit("// This example is intentionally empty to ensure this file contains at least\n")
b.emit("// one testable entity. go-marshal is forced to emit a test file if a package\n")