摘要: import ( "fmt" "os" "path/filepath" "path" ) files := "E:\\data\\test.txt" paths, fileName := filepath.Split(files) fmt.Println(paths, fileName) //获取路 阅读全文
posted @ 2022-01-27 15:53 醒日是归时 阅读(1680) 评论(0) 推荐(0) 编辑
摘要: //方法一 func readConfig1(path, filename, filetype string) interface{} { viper.AddConfigPath(path) viper.SetConfigFile(filename) viper.SetConfigType(file 阅读全文
posted @ 2022-01-27 14:32 醒日是归时 阅读(266) 评论(0) 推荐(0) 编辑