MM-31063: Change constants to use CamelCase (#16608)

* MM-31063: Change constants to use CamelCase

* store package

* change allcaps to camel case (#16615)

* New tools.mod

Co-authored-by: Ibrahim Serdar Acikgoz <serdaracikgoz86@gmail.com>
Этот коммит содержится в:
Agniva De Sarker
2021-01-04 11:32:29 +05:30
коммит произвёл GitHub
родитель 8b6ac5f5d2
Коммит c1dd23a3c8
158 изменённых файлов: 1485 добавлений и 1479 удалений

Просмотреть файл

@@ -44,8 +44,8 @@ func getJob(c *Context, w http.ResponseWriter, r *http.Request) {
func downloadJob(c *Context, w http.ResponseWriter, r *http.Request) {
config := c.App.Config()
const FILE_PATH = "export"
const FILE_MIME = "application/zip"
const FilePath = "export"
const FileMime = "application/zip"
c.RequireJobId()
if c.Err != nil {
@@ -75,7 +75,7 @@ func downloadJob(c *Context, w http.ResponseWriter, r *http.Request) {
}
fileName := job.Id + ".zip"
filePath := filepath.Join(FILE_PATH, fileName)
filePath := filepath.Join(FilePath, fileName)
fileReader, err := c.App.FileReader(filePath)
if err != nil {
c.Err = err
@@ -86,7 +86,7 @@ func downloadJob(c *Context, w http.ResponseWriter, r *http.Request) {
// We are able to pass 0 for content size due to the fact that Golang's serveContent (https://golang.org/src/net/http/fs.go)
// already sets that for us
err = writeFileResponse(fileName, FILE_MIME, 0, time.Unix(0, job.LastActivityAt*int64(1000*1000)), *c.App.Config().ServiceSettings.WebserverMode, fileReader, true, w, r)
err = writeFileResponse(fileName, FileMime, 0, time.Unix(0, job.LastActivityAt*int64(1000*1000)), *c.App.Config().ServiceSettings.WebserverMode, fileReader, true, w, r)
if err != nil {
c.Err = err
return