Skip to content

Commit 02a9f89

Browse files
committed
cmd/stringer: add empty line between types
Adds an empty line between code generated for types A and B with calls like stringer type=A,B.
1 parent 985c282 commit 02a9f89

1 file changed

Lines changed: 1 addition & 0 deletions

File tree

cmd/stringer/stringer.go

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -350,6 +350,7 @@ func findValues(typeName string, pkg *Package) []Value {
350350
// generate produces the String method for the named type.
351351
func (g *Generator) generate(typeName string, values []Value) {
352352
// Generate code that will fail if the constants change value.
353+
g.Printf("\n")
353354
g.Printf("func _() {\n")
354355
g.Printf("\t// An \"invalid array index\" compiler error signifies that the constant values have changed.\n")
355356
g.Printf("\t// Re-run the stringer command to generate them again.\n")

0 commit comments

Comments
 (0)