feat: add gen enum command

This commit is contained in:
Rogee
2024-12-19 15:00:58 +08:00
parent 797ff49fc7
commit 80ab62534d
15 changed files with 2674 additions and 5 deletions

23
pkg/utils/fs.go Normal file
View File

@@ -0,0 +1,23 @@
package utils
import (
"os"
)
func IsDir(dir string) bool {
f, err := os.Stat(dir)
if err != nil {
return false
}
return f.IsDir()
}
func IsFile(path string) bool {
f, err := os.Stat(path)
if err != nil {
return false
}
return f.Mode().IsRegular()
}