Skip to content

Commit 5053873

Browse files
committed
Generator: API: Add the license header to generated code
1 parent 3ed9f51 commit 5053873

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

internal/cmd/generate/commands/gensource/generator.go

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,10 @@ func (g *Generator) w(s string) {
7272
}
7373

7474
func (g *Generator) genHeader() {
75-
g.w("// Code generated")
75+
g.w(`// Licensed to Elasticsearch B.V under one or more agreements.
76+
// Elasticsearch B.V licenses this file to you under the Apache 2.0 License.
77+
// See the LICENSE file in the project root for more information.` + "\n")
78+
g.w("//\n// Code generated")
7679
if EsVersion != "" {
7780
g.w(fmt.Sprintf(" from specification version %s", EsVersion))
7881
}

0 commit comments

Comments
 (0)