diff --git a/cmd/avrogen/testdata/golden.go b/cmd/avrogen/testdata/golden.go index d6f5ca8..1f17271 100644 --- a/cmd/avrogen/testdata/golden.go +++ b/cmd/avrogen/testdata/golden.go @@ -1,8 +1,7 @@ +// Code generated by avro/gen. DO NOT EDIT. // package testpkg is generated from schema.avsc. package testpkg -// Code generated by avro/gen. DO NOT EDIT. - // Test is a test struct. type Test struct { // SomeString is a string. diff --git a/cmd/avrogen/testdata/golden_encoders.go b/cmd/avrogen/testdata/golden_encoders.go index 5f45e05..44b3e50 100644 --- a/cmd/avrogen/testdata/golden_encoders.go +++ b/cmd/avrogen/testdata/golden_encoders.go @@ -1,6 +1,5 @@ -package testpkg - // Code generated by avro/gen. DO NOT EDIT. +package testpkg import ( "github.com/hamba/avro/v2" diff --git a/cmd/avrogen/testdata/golden_encoders_fullschema.go b/cmd/avrogen/testdata/golden_encoders_fullschema.go index 721f0f7..7bc7736 100644 --- a/cmd/avrogen/testdata/golden_encoders_fullschema.go +++ b/cmd/avrogen/testdata/golden_encoders_fullschema.go @@ -1,6 +1,5 @@ -package testpkg - // Code generated by avro/gen. DO NOT EDIT. +package testpkg import ( "github.com/hamba/avro/v2" diff --git a/cmd/avrogen/testdata/golden_fullname.go b/cmd/avrogen/testdata/golden_fullname.go index fff8517..5b44801 100644 --- a/cmd/avrogen/testdata/golden_fullname.go +++ b/cmd/avrogen/testdata/golden_fullname.go @@ -1,6 +1,5 @@ -package testpkg - // Code generated by avro/gen. DO NOT EDIT. +package testpkg // Test is a test struct. type ABTest struct { diff --git a/cmd/avrogen/testdata/golden_stricttypes.go b/cmd/avrogen/testdata/golden_stricttypes.go index 9b2a0ae..a3edc67 100644 --- a/cmd/avrogen/testdata/golden_stricttypes.go +++ b/cmd/avrogen/testdata/golden_stricttypes.go @@ -1,6 +1,5 @@ -package testpkg - // Code generated by avro/gen. DO NOT EDIT. +package testpkg // Test is a test struct. type Test struct { diff --git a/gen/output_template.tmpl b/gen/output_template.tmpl index 1143fe5..9d6d59c 100644 --- a/gen/output_template.tmpl +++ b/gen/output_template.tmpl @@ -1,10 +1,9 @@ +// Code generated by avro/gen. DO NOT EDIT. {{- if len .PackageDoc }} // {{ .PackageDoc }} {{- end }} package {{ .PackageName }} -// Code generated by avro/gen. DO NOT EDIT. - {{- $encoders := .WithEncoders }} {{ if len .Imports }} import ( @@ -57,4 +56,4 @@ package {{ .PackageName }} return avro.Marshal(o.Schema(), o) } {{- end }} -{{ end }} \ No newline at end of file +{{ end }} diff --git a/gen/testdata/golden.go b/gen/testdata/golden.go index f0cbfbd..438b18a 100644 --- a/gen/testdata/golden.go +++ b/gen/testdata/golden.go @@ -1,6 +1,5 @@ -package something - // Code generated by avro/gen. DO NOT EDIT. +package something import ( "math/big" diff --git a/gen/testdata/golden_encoders.go b/gen/testdata/golden_encoders.go index 73d3518..2539c38 100644 --- a/gen/testdata/golden_encoders.go +++ b/gen/testdata/golden_encoders.go @@ -1,6 +1,5 @@ -package something - // Code generated by avro/gen. DO NOT EDIT. +package something import ( "math/big" diff --git a/gen/testdata/golden_encoders_fullschema.go b/gen/testdata/golden_encoders_fullschema.go index 908c13a..fd012fa 100644 --- a/gen/testdata/golden_encoders_fullschema.go +++ b/gen/testdata/golden_encoders_fullschema.go @@ -1,6 +1,5 @@ -package something - // Code generated by avro/gen. DO NOT EDIT. +package something import ( "math/big" diff --git a/gen/testdata/golden_fullname.go b/gen/testdata/golden_fullname.go index 4f39813..877c698 100644 --- a/gen/testdata/golden_fullname.go +++ b/gen/testdata/golden_fullname.go @@ -1,6 +1,5 @@ -package something - // Code generated by avro/gen. DO NOT EDIT. +package something import ( "math/big" diff --git a/gen/testdata/golden_logicaltype.go b/gen/testdata/golden_logicaltype.go index c2f93c5..a32011f 100644 --- a/gen/testdata/golden_logicaltype.go +++ b/gen/testdata/golden_logicaltype.go @@ -1,6 +1,5 @@ -package something - // Code generated by avro/gen. DO NOT EDIT. +package something import ( "math/big" diff --git a/gen/testdata/golden_multiple.go b/gen/testdata/golden_multiple.go index 34c3f08..6b074ee 100644 --- a/gen/testdata/golden_multiple.go +++ b/gen/testdata/golden_multiple.go @@ -1,6 +1,5 @@ -package something - // Code generated by avro/gen. DO NOT EDIT. +package something // TestUnionType is a generated struct. type TestUnionType struct {