unconvert
main
golangci-lint run --enable unconvert ./...
- Remove unnecessary type conversion. - Found via: `golangci-lint run --enable unconvert ./...`
uh nice, can you enforce it by adding a .golangci.yml ?
.golangci.yml
- Remove unnecessary type conversion. - Fix gocritic checks.
@6543 Added it, also added gocritic while I was at it.
@ -46,3 +45,1 @@
header := make(http.Header)
var statusCode int
func (f FileResponse) createHttpResponse(cacheKey string) (header http.Header, statusCode int) {
header is not initalized now -> https://go.dev/play/p/ch8XppKOUSQ
Good catch!
f2f943c0d8
No due date set.
No dependencies set.
Deleting a branch is permanent. It CANNOT be undone. Continue?
golangci-lint run --enable unconvert ./...
uh nice, can you enforce it by adding a
.golangci.yml
?@6543 Added it, also added gocritic while I was at it.
@ -46,3 +45,1 @@
header := make(http.Header)
var statusCode int
func (f FileResponse) createHttpResponse(cacheKey string) (header http.Header, statusCode int) {
header is not initalized now
-> https://go.dev/play/p/ch8XppKOUSQ
Good catch!
f2f943c0d8
into main 7 months agoReviewers
f2f943c0d8
.