This commit is contained in:
BaoXuebin 2021-12-15 23:14:04 +08:00
parent 1401f24711
commit d05cc9254e
4 changed files with 13 additions and 6 deletions

1
.gitignore vendored
View File

@ -2,5 +2,6 @@
.git
bindata.go
*.exe
beancount-gs
gin.log
config.json

Binary file not shown.

View File

@ -209,11 +209,15 @@ func LoadLedgerConfigMap() error {
if err != nil {
return err
}
if string(fileContent) != "" {
err = json.Unmarshal(fileContent, &ledgerConfigMap)
if err != nil {
LogSystemError("Failed unmarshal ledger_config file (" + path + ")")
return err
}
} else {
ledgerConfigMap = make(map[string]Config)
}
LogSystemInfo("Success load ledger_config file (" + path + ")")
}
return nil

View File

@ -3,11 +3,13 @@ package script
import "os"
func GetServerConfigFilePath() string {
return "./config/config.json"
currentPath, _ := os.Getwd()
return currentPath + "/config/config.json"
}
func GetServerWhiteListFilePath() string {
return "./config/white_list.json"
currentPath, _ := os.Getwd()
return currentPath + "/config/white_list.json"
}
func GetServerLedgerConfigFilePath() string {