mirror of
https://codeberg.org/Codeberg/pages-server.git
synced 2025-04-25 06:16:58 +00:00
Add golangci linters
- Remove unnecessary type conversion. - Fix gocritic checks.
This commit is contained in:
parent
df5199c9a3
commit
827c582147
7 changed files with 40 additions and 21 deletions
|
@ -42,10 +42,7 @@ func (f FileResponse) IsEmpty() bool {
|
|||
return len(f.Body) != 0
|
||||
}
|
||||
|
||||
func (f FileResponse) createHttpResponse(cacheKey string) (http.Header, int) {
|
||||
header := make(http.Header)
|
||||
var statusCode int
|
||||
|
||||
func (f FileResponse) createHttpResponse(cacheKey string) (header http.Header, statusCode int) {
|
||||
if f.Exists {
|
||||
statusCode = http.StatusOK
|
||||
} else {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue