maybe right?
This commit is contained in:
parent
a6c5755fcd
commit
899cbb3483
|
@ -43,6 +43,7 @@ func addCommonHeader(filename string) error {
|
||||||
|
|
||||||
var start bool = true
|
var start bool = true
|
||||||
var found bool
|
var found bool
|
||||||
|
var done bool
|
||||||
|
|
||||||
// drop the old copywrite lines
|
// drop the old copywrite lines
|
||||||
for _, line := range strings.Split(string(data), "\n") {
|
for _, line := range strings.Split(string(data), "\n") {
|
||||||
|
@ -61,11 +62,14 @@ func addCommonHeader(filename string) error {
|
||||||
if strings.HasPrefix(line, "//") && found {
|
if strings.HasPrefix(line, "//") && found {
|
||||||
continue
|
continue
|
||||||
} else {
|
} else {
|
||||||
|
found = false
|
||||||
|
}
|
||||||
|
if !done {
|
||||||
fmt.Fprintln(pf, "// Copyright 2017-2025 WIT.COM Inc. All rights reserved.")
|
fmt.Fprintln(pf, "// Copyright 2017-2025 WIT.COM Inc. All rights reserved.")
|
||||||
fmt.Fprintln(pf, "// Use of this source code is governed by the GPL 3.0")
|
fmt.Fprintln(pf, "// Use of this source code is governed by the GPL 3.0")
|
||||||
fmt.Fprintln(pf, "")
|
fmt.Fprintln(pf, "")
|
||||||
fmt.Fprintln(pf, line)
|
fmt.Fprintln(pf, line)
|
||||||
found = false
|
done = true
|
||||||
}
|
}
|
||||||
fmt.Fprintln(pf, line)
|
fmt.Fprintln(pf, line)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue