Merge pull request #2197 from alexandear/fix-generated-hdr

Update comments in generated code to align with Go standards
pull/2202/head
Jack Christensen 2024-12-21 12:40:23 -06:00 committed by GitHub
commit e5d321f920
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
6 changed files with 11 additions and 5 deletions

View File

@ -2,7 +2,7 @@ require "erb"
rule '.go' => '.go.erb' do |task|
erb = ERB.new(File.read(task.source))
File.write(task.name, "// Do not edit. Generated from #{task.source}\n" + erb.result(binding))
File.write(task.name, "// Code generated from #{task.source}. DO NOT EDIT.\n\n" + erb.result(binding))
sh "goimports", "-w", task.name
end

View File

@ -1,4 +1,5 @@
// Do not edit. Generated from pgtype/int.go.erb
// Code generated from pgtype/int.go.erb. DO NOT EDIT.
package pgtype
import (

View File

@ -1,4 +1,5 @@
// Do not edit. Generated from pgtype/int_test.go.erb
// Code generated from pgtype/int_test.go.erb. DO NOT EDIT.
package pgtype_test
import (

View File

@ -1,3 +1,5 @@
// Code generated from pgtype/integration_benchmark_test.go.erb. DO NOT EDIT.
package pgtype_test
import (

View File

@ -1,4 +1,5 @@
// Do not edit. Generated from pgtype/zeronull/int.go.erb
// Code generated from pgtype/zeronull/int.go.erb. DO NOT EDIT.
package zeronull
import (

View File

@ -1,4 +1,5 @@
// Do not edit. Generated from pgtype/zeronull/int_test.go.erb
// Code generated from pgtype/zeronull/int_test.go.erb. DO NOT EDIT.
package zeronull_test
import (