mirror of
https://gitee.com/sjqzhang/go-fastdfs.git
synced 2024-12-01 18:57:58 +08:00
chore: use fmt.Errorf(...) instead of errors.New(fmt.Sprintf(...))
This commit is contained in:
parent
8c79a1e3d1
commit
6900e3d416
@ -723,7 +723,7 @@ func (c *Server) GetMd5sMapByDate(date string, filename string) (*goutil.CommonM
|
||||
fpath = DATA_DIR + "/" + date + "/" + filename
|
||||
}
|
||||
if !c.util.FileExists(fpath) {
|
||||
return result, errors.New(fmt.Sprintf("fpath %s not found", fpath))
|
||||
return result, fmt.Errorf("fpath %s not found", fpath)
|
||||
}
|
||||
if data, err = ioutil.ReadFile(fpath); err != nil {
|
||||
return result, err
|
||||
|
@ -108,7 +108,7 @@ func (c *Server) initTus() {
|
||||
return nil, errors.New(msg)
|
||||
}
|
||||
}
|
||||
return nil, errors.New(fmt.Sprintf("%s not found", fp))
|
||||
return nil, fmt.Errorf("%s not found", fp)
|
||||
}
|
||||
}
|
||||
store.UseIn(composer)
|
||||
|
Loading…
Reference in New Issue
Block a user