将api.yaml修改为api_node.yaml

This commit is contained in:
刘祥超
2023-08-12 15:08:22 +08:00
parent 94b9c23323
commit d416a2186c
11 changed files with 70 additions and 54 deletions

View File

@@ -37,7 +37,7 @@ func main() {
// validate config
_, err := configs.LoadAPIConfig()
if err != nil {
fmt.Println("[ERROR]start failed: load api config from '" + Tea.ConfigFile("api.yaml") + "' failed: " + err.Error())
fmt.Println("[ERROR]start failed: load api config from '" + Tea.ConfigFile(configs.ConfigFileName) + "' failed: " + err.Error())
os.Exit(0)
}
})
@@ -64,7 +64,7 @@ func main() {
// verify dir
{
fmt.Println("Checking '" + dir + "' ...")
for _, subDir := range []string{"bin", "configs/api.yaml", "logs"} {
for _, subDir := range []string{"bin/" + filepath.Base(exe), "configs", "logs"} {
_, err := os.Stat(dir + "/" + subDir)
if err != nil {
fmt.Println("[ERROR]program directory structure has been broken, please remove it manually.")