gitee.com/h79/goutils@v1.22.10/common/config/config_test.go (about) 1 package config 2 3 import ( 4 "path/filepath" 5 "testing" 6 ) 7 8 func TestConfFileName(t *testing.T) { 9 pa := filepath.Dir("./data/run/conf/xxx.json") 10 t.Log(pa) 11 12 pa, fi := filepath.Split("./bin//") 13 t.Log(pa) 14 t.Log(fi) 15 16 t.Log(filepath.Clean("./bin//")) 17 18 conf := Config{} 19 conf.Init() 20 21 t.Log(FileNameInAppDataPathV2("name")) 22 23 t.Log(FileNameInDataPath("name")) 24 25 t.Log(FileNameInConfPath("name")) 26 t.Log(FileNameInConfAppPath("NAME")) 27 t.Log(FileNameInEnvPath("NAME")) 28 }