style: linker

This commit is contained in:
songzhibin97
2021-12-06 12:44:26 +08:00
parent 2b9365da17
commit 0fe4750991
95 changed files with 208 additions and 235 deletions

View File

@@ -11,8 +11,10 @@ import (
// 前端发送每片多大
// 前端告知是否为最后一片且是否完成
const breakpointDir = "./breakpointDir/"
const finishDir = "./fileDir/"
const (
breakpointDir = "./breakpointDir/"
finishDir = "./fileDir/"
)
//@author: [piexlmax](https://github.com/piexlmax)
//@function: BreakPointContinue
@@ -28,7 +30,6 @@ func BreakPointContinue(content []byte, fileName string, contentNumber int, cont
}
err, pathc := makeFileContent(content, fileName, path, contentNumber)
return err, pathc
}
//@author: [piexlmax](https://github.com/piexlmax)
@@ -79,7 +80,7 @@ func MakeFile(fileName string, FileMd5 string) (error, string) {
return err, finishDir + fileName
}
_ = os.MkdirAll(finishDir, os.ModePerm)
fd, err := os.OpenFile(finishDir+fileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0644)
fd, err := os.OpenFile(finishDir+fileName, os.O_RDWR|os.O_CREATE|os.O_APPEND, 0o644)
if err != nil {
return err, finishDir + fileName
}