Skip to content

Commit d1a3956

Browse files
Refine Go renderer's generated file header comment. (#2708)
Updated the header comment for Go files to align with standard conventions. Go tools, like golangci-lint, often rely on this comment format. see https://pkg.go.dev/cmd/go#hdr-Generate_Go_files_by_processing_source Co-authored-by: inferrinizzard <inferrinizzard@gmail.com>
1 parent 63db12c commit d1a3956

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

packages/quicktype-core/src/language/Golang/GolangRenderer.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -161,7 +161,7 @@ export class GoRenderer extends ConvenienceRenderer {
161161
this.leadingComments === undefined
162162
) {
163163
this.emitLineOnce(
164-
"// This file was generated from JSON Schema using quicktype, do not modify it directly."
164+
"// Code generated from JSON Schema using quicktype. DO NOT EDIT."
165165
);
166166
this.emitLineOnce("// To parse and unparse this JSON data, add this code to your project and do:");
167167
this.emitLineOnce("//");
@@ -343,7 +343,7 @@ export class GoRenderer extends ConvenienceRenderer {
343343
}
344344

345345
private emitSingleFileHeaderComments(): void {
346-
this.emitLineOnce("// This file was generated from JSON Schema using quicktype, do not modify it directly.");
346+
this.emitLineOnce("// Code generated from JSON Schema using quicktype. DO NOT EDIT.");
347347
this.emitLineOnce("// To parse and unparse this JSON data, add this code to your project and do:");
348348
this.forEachTopLevel("none", (_: Type, name: Name) => {
349349
this.emitLine("//");

0 commit comments

Comments
 (0)