fix: make lint&ci happy

This commit is contained in:
源文雨
2025-10-01 00:16:07 +08:00
parent d2e6c9780f
commit 8825514fb2
9 changed files with 54 additions and 9 deletions

51
abineundo/ref/main.go Normal file
View File

@@ -0,0 +1,51 @@
package main
import (
"flag"
"io"
"os"
"path"
)
func main() {
root := flag.String("r", "", "project root dir")
flag.Parse()
fi, err := os.Open(path.Join(*root, "main.go"))
if err != nil {
panic(err)
}
fo, err := os.Create(path.Join(*root, "abineundo/ref/main/main.go"))
if err != nil {
panic(err)
}
_, err = io.Copy(fo, fi)
if err != nil {
panic(err)
}
fi.Close()
fo.Close()
regf := path.Join(*root, "custom/register.go")
if _, err := os.Stat(regf); err != nil {
if os.IsNotExist(err) {
return
}
panic(err)
}
fi, err = os.Open(regf)
if err != nil {
panic(err)
}
fo, err = os.Create(path.Join(*root, "abineundo/ref/custom/register.go"))
if err != nil {
panic(err)
}
_, err = io.Copy(fo, fi)
if err != nil {
panic(err)
}
fi.Close()
fo.Close()
}