Add a commentChars parameter to EmitHeaderWarning
Now that we're using this to generate multiple languages, this
needs to be parameterized.  Splitting out into its own change.
@@ -60,10 +60,10 @@ func (g *GenWriter) Writefmtln(msg string, args ...interface{}) {
g.Writefmt(msg+"\n", args...)
}
-// EmitHeaderWarning emits the standard "WARNING" into a generated file.
-func (g *GenWriter) EmitHeaderWarning() {
- g.Writefmtln("// *** WARNING: this file was generated by %v. ***", g.tool)
- g.Writefmtln("// *** Do not edit by hand unless you're certain you know what you are doing! ***")
+// EmitHeaderWarning emits the standard "WARNING" into a generated file, prefixed by commentChars.
+func (g *GenWriter) EmitHeaderWarning(commentChars string) {
+ g.Writefmtln("%s *** WARNING: this file was generated by %v. ***", commentChars, g.tool)
+ g.Writefmtln("%s *** Do not edit by hand unless you're certain you know what you are doing! ***", commentChars)
g.Writefmtln("")
}
