Skip to content

Commit 85f2af2

Browse files
committed
Used the fileHeader constant
1 parent 8373650 commit 85f2af2

File tree

1 file changed

+4
-18
lines changed

1 file changed

+4
-18
lines changed

generate_perror/main.go

Lines changed: 4 additions & 18 deletions
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,10 @@ const (
3939
// See the License for the specific language governing permissions and
4040
// limitations under the License.
4141
42+
// Generated by generate_perror/main.go
4243
package main
44+
45+
var MysqlErrNameToNum = map[string]int{
4346
`
4447
)
4548

@@ -153,24 +156,7 @@ func main() {
153156
}
154157
defer f.Close()
155158
w := bufio.NewWriter(f)
156-
_, err = w.WriteString(`// Copyright 2023 PingCAP, Inc.
157-
//
158-
// Licensed under the Apache License, Version 2.0 (the "License");
159-
// you may not use this file except in compliance with the License.
160-
// You may obtain a copy of the License at
161-
//
162-
// http://www.apache.org/licenses/LICENSE-2.0
163-
//
164-
// Unless required by applicable law or agreed to in writing, software
165-
// distributed under the License is distributed on an "AS IS" BASIS,
166-
// See the License for the specific language governing permissions and
167-
// limitations under the License.
168-
169-
// Generated by generate_perror/main.go
170-
package main
171-
172-
var MysqlErrNameToNum = map[string]int{
173-
`)
159+
_, err = w.WriteString(fileHeader)
174160

175161
if err != nil {
176162
log.Fatal(err)

0 commit comments

Comments
 (0)