chore: Enable more linters

Enable more golangci-lint linters.
* `forbidigo` to stop use of non-logger console printing.
* `goimports` to make sure `import` blocks are formatted nicely.
* `misspell` to catch spelling mistakes.
* `whitespace` to catch whitespace issues.

Signed-off-by: SuperQ <superq@gmail.com>
This commit is contained in:
SuperQ
2025-03-12 16:29:45 +01:00
parent a9180c972c
commit aed453cc8c
5 changed files with 17 additions and 12 deletions

2
web.go
View File

@@ -16,6 +16,7 @@ import (
"golang.org/x/crypto/bcrypt"
)
//nolint:typecheck
//go:embed all:static
var staticFiles embed.FS
@@ -419,7 +420,6 @@ func handleSetup(c *gin.Context) {
// Set the cookie
c.SetCookie("authToken", config.LocalAuthToken, 7*24*60*60, "/", "", false, true)
} else {
// For noPassword mode, ensure the password field is empty
config.HashedPassword = ""