摘要:
import ( "fmt" "os" "path/filepath" "path" ) files := "E:\\data\\test.txt" paths, fileName := filepath.Split(files) fmt.Println(paths, fileName) //获取路 阅读全文
摘要:
//方法一 func readConfig1(path, filename, filetype string) interface{} { viper.AddConfigPath(path) viper.SetConfigFile(filename) viper.SetConfigType(file 阅读全文