Chore: format code

This commit is contained in:
loyalsoldier
2021-05-18 23:16:04 +08:00
parent 8f9eccefe9
commit 2b7401109f
33 changed files with 51 additions and 76 deletions

View File

@@ -140,7 +140,7 @@ func (fc *FileCache) getCacheFileName(key string) (string, error) {
return "", err
}
if !ok {
err = os.MkdirAll(cachePath, os.ModePerm)
err = os.MkdirAll(cachePath, os.ModePerm)
if err != nil {
return "", berror.Wrapf(err, CreateFileCacheDirFailed,
"could not create the directory: %s", cachePath)
@@ -299,8 +299,8 @@ func FileGetContents(filename string) ([]byte, error) {
data, err := ioutil.ReadFile(filename)
if err != nil {
return nil, berror.Wrapf(err, ReadFileCacheContentFailed,
"could not read the data from the file: %s, " +
"please confirm that file exist and Beego has the permission to read the content.", filename)
"could not read the data from the file: %s, "+
"please confirm that file exist and Beego has the permission to read the content.", filename)
}
return data, nil
}