Commit 6a33c7bb by lichenggang

增加用户配置文件

parent 80a811ce
Showing with 20 additions and 0 deletions
package config
import "os"
var Directory string
var UserConfigPath string
func InitConfig() {
Directory = "E:\\test_logs" // directory of the log
UserConfigPath = "E:\\users.json"
logenv := os.Getenv("GOLOGENV")
if logenv == "TEST" {
Directory = "/data/soft/bigdatav3.0/test_rsync_log"
UserConfigPath = "/home/lic/users.json"
}
if logenv == "PRODUCT" {
Directory = "/data/soft/rsync_log"
UserConfigPath = "/data/users.json"
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment