update
This commit is contained in:
10
util/file.go
10
util/file.go
@ -2,7 +2,7 @@
|
||||
//
|
||||
// Description : 文件相关工具
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 2021-04-26 6:00 下午
|
||||
package util
|
||||
@ -18,7 +18,7 @@ import (
|
||||
|
||||
// GetProjectPath 获取项目路径(可执行文件所在目录)
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:32 下午 2021/4/26
|
||||
func GetProjectPath() (string, error) {
|
||||
@ -37,7 +37,7 @@ func GetProjectPath() (string, error) {
|
||||
|
||||
// ReadYmlConfig 读取yml配置问价,并解析到指定的结构体中
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:35 下午 2021/4/26
|
||||
func ReadYmlConfig(filePath string, result interface{}) error {
|
||||
@ -56,7 +56,7 @@ func ReadYmlConfig(filePath string, result interface{}) error {
|
||||
|
||||
// ReadFileContent 读取文件内容
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:37 下午 2021/4/26
|
||||
func ReadFileContent(filePath string) ([]byte, error) {
|
||||
@ -78,7 +78,7 @@ func ReadFileContent(filePath string) ([]byte, error) {
|
||||
|
||||
// IsFileExist 判断文件是否存在
|
||||
//
|
||||
// Author : go_developer@163.com<张德满>
|
||||
// Author : go_developer@163.com<白茶清欢>
|
||||
//
|
||||
// Date : 10:37 下午 2021/4/26
|
||||
func IsFileExist(filePath string) (bool, bool) {
|
||||
|
Reference in New Issue
Block a user