From 17cd36818ca4bab60ec8e9393c4ce3fa80f1c76e Mon Sep 17 00:00:00 2001 From: Oleksandr Redko Date: Wed, 18 Dec 2024 02:15:32 +0200 Subject: [PATCH] Update comments in generated code to align with Go standards --- Rakefile | 2 +- pgtype/int.go | 3 ++- pgtype/int_test.go | 3 ++- pgtype/integration_benchmark_test.go | 2 ++ pgtype/zeronull/int.go | 3 ++- pgtype/zeronull/int_test.go | 3 ++- 6 files changed, 11 insertions(+), 5 deletions(-) diff --git a/Rakefile b/Rakefile index d957573e9..3e3aa5030 100644 --- a/Rakefile +++ b/Rakefile @@ -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 diff --git a/pgtype/int.go b/pgtype/int.go index 90a20a26a..7a2f8cb24 100644 --- a/pgtype/int.go +++ b/pgtype/int.go @@ -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 ( diff --git a/pgtype/int_test.go b/pgtype/int_test.go index 73294b3ca..8c4987691 100644 --- a/pgtype/int_test.go +++ b/pgtype/int_test.go @@ -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 ( diff --git a/pgtype/integration_benchmark_test.go b/pgtype/integration_benchmark_test.go index 41e5f7507..88516a9fb 100644 --- a/pgtype/integration_benchmark_test.go +++ b/pgtype/integration_benchmark_test.go @@ -1,3 +1,5 @@ +// Code generated from pgtype/integration_benchmark_test.go.erb. DO NOT EDIT. + package pgtype_test import ( diff --git a/pgtype/zeronull/int.go b/pgtype/zeronull/int.go index 4fec8a1a0..7fa0210e0 100644 --- a/pgtype/zeronull/int.go +++ b/pgtype/zeronull/int.go @@ -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 ( diff --git a/pgtype/zeronull/int_test.go b/pgtype/zeronull/int_test.go index 7204cc88c..7e32064ab 100644 --- a/pgtype/zeronull/int_test.go +++ b/pgtype/zeronull/int_test.go @@ -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 (