codegen: force line return in all `FlatMapstructure` code generation to avoid weird go-fmt discrepencies

This commit is contained in:
Adrien Delorme 2020-03-17 12:27:15 +01:00
parent 94a1f0bcb6
commit 094b837ed2
1 changed files with 2 additions and 2 deletions

View File

@ -162,8 +162,8 @@ func main() {
fmt.Fprintf(out, "\n// %s is an auto-generated flat version of %s.", flatenedStruct.FlatStructName, flatenedStruct.OriginalStructName)
fmt.Fprintf(out, "\n// Where the contents a fields with a `mapstructure:,squash` tag are bubbled up.")
fmt.Fprintf(out, "\nfunc (*%s) FlatMapstructure() interface{ HCL2Spec() map[string]hcldec.Spec } {", flatenedStruct.OriginalStructName)
fmt.Fprintf(out, "return new(%s)", flatenedStruct.FlatStructName)
fmt.Fprint(out, "}\n")
fmt.Fprintf(out, "\nreturn new(%s)", flatenedStruct.FlatStructName)
fmt.Fprint(out, "\n}\n")
fmt.Fprintf(out, "\n// HCL2Spec returns the hcl spec of a %s.", flatenedStruct.OriginalStructName)
fmt.Fprintf(out, "\n// This spec is used by HCL to read the fields of %s.", flatenedStruct.OriginalStructName)