golangci-lint reports a number of errors and we should fix them:
config/config.go:107: File is not `gofumpt`-ed (gofumpt)
var mode string
var logMode LogMode
util/file.go:43:5: naked return in func `ZipFile.<func():35>` with 50 lines of code (nakedret)
return
^
util/file.go:61:5: naked return in func `ZipFile.<func():35>` with 50 lines of code (nakedret)
return
^
util/file.go:73:5: naked return in func `ZipFile.<func():35>` with 50 lines of code (nakedret)
return
^
template/extension/link.go:48:3: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (staticcheck)
rand.Seed(time.Now().UnixNano())
^
template/extension/tool.go:29:2: SA1019: rand.Seed has been deprecated since Go 1.20 and an alternative has been available since Go 1.0: As of Go 1.20 there is no reason to call Seed with a random value. Programs that call Seed with a known value to get a specific sequence of results should use New(NewSource(seed)) to obtain a local random generator. (staticcheck)
rand.Seed(time.Now().UnixNano())
^
model/dto/base.go:32:2: assigned to contentLen, but reassigned without using the value (wastedassign)
contentLen := 0
^
event/listener/template_config.go:122:2: assigned to themeBasePath, but reassigned without using the value (wastedassign)
themeBasePath := ""
^
You can run golangci-lint and get the above output by running:
docker run -t --rm -v $(pwd):/app -w /app golangci/golangci-lint:v1.55.2 golangci-lint run -v
golangci-lint reports a number of errors and we should fix them:
You can run golangci-lint and get the above output by running: