fix: pin golangci-lint install to commit SHA (fixes #13)
All checks were successful
check / check (push) Successful in 1m31s
All checks were successful
check / check (push) Successful in 1m31s
- Fix Dockerfile: use correct v2 module path with commit SHA (github.com/golangci/golangci-lint/v2/cmd/golangci-lint@eabc2638...) - Add CGO_ENABLED=0 for alpine compatibility - Fix 35 lint issues found by golangci-lint v2.1.6: - Remove unused nolint directives, add nolintlint where needed - Pre-allocate migrations slice - Use t.Context() instead of context.Background() in tests - Fix blank lines between comments and exported functions in ui.go
This commit is contained in:
@@ -47,7 +47,7 @@ func (b *Base) GetDB() *sql.DB {
|
||||
}
|
||||
|
||||
// GetUserLookup returns the DB as a UserLookup if it implements the interface.
|
||||
func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn
|
||||
func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn,nolintlint // returns interface by design
|
||||
if ul, ok := b.db.(UserLookup); ok {
|
||||
return ul
|
||||
}
|
||||
@@ -56,7 +56,7 @@ func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn
|
||||
}
|
||||
|
||||
// GetChannelLookup returns the DB as a ChannelLookup if it implements the interface.
|
||||
func (b *Base) GetChannelLookup() ChannelLookup { //nolint:ireturn
|
||||
func (b *Base) GetChannelLookup() ChannelLookup { //nolint:ireturn,nolintlint // returns interface by design
|
||||
if cl, ok := b.db.(ChannelLookup); ok {
|
||||
return cl
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user