添加用户缓存及更新,添加配置文件增删改查接口,添加文件功能.添加配置文件添加请求
This commit is contained in:
parent
5a3f899772
commit
d618cf0332
|
|
@ -95,8 +95,8 @@ func CreateConfigFile(req *proto.AddConfigFileReq, userId int) error {
|
||||||
err = fmt.Errorf("file path is invalid")
|
err = fmt.Errorf("file path is invalid")
|
||||||
return err
|
return err
|
||||||
}
|
}
|
||||||
_, err = os.Stat(file)
|
_, fileErr := os.Stat(file)
|
||||||
if err != nil {
|
if fileErr != nil {
|
||||||
//创建文件
|
//创建文件
|
||||||
f, err2 := os.Create(file)
|
f, err2 := os.Create(file)
|
||||||
if err2 != nil {
|
if err2 != nil {
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue