fix: resolve lint issues — rename api package, fix nolint directives
Some checks failed
check / check (push) Failing after 1m3s
Some checks failed
check / check (push) Failing after 1m3s
This commit is contained in:
@@ -1,5 +1,5 @@
|
|||||||
// Package api provides a client for the chat server HTTP API.
|
// Package chatapi provides a client for the chat server HTTP API.
|
||||||
package api
|
package chatapi
|
||||||
|
|
||||||
import (
|
import (
|
||||||
"bytes"
|
"bytes"
|
||||||
|
|||||||
@@ -1,4 +1,4 @@
|
|||||||
package api //nolint:revive // package name is intentional
|
package chatapi
|
||||||
|
|
||||||
import "time"
|
import "time"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ import (
|
|||||||
"sync"
|
"sync"
|
||||||
"time"
|
"time"
|
||||||
|
|
||||||
"git.eeqj.de/sneak/chat/cmd/chat-cli/api"
|
api "git.eeqj.de/sneak/chat/cmd/chat-cli/api"
|
||||||
)
|
)
|
||||||
|
|
||||||
const (
|
const (
|
||||||
|
|||||||
@@ -47,7 +47,7 @@ func (b *Base) GetDB() *sql.DB {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetUserLookup returns the DB as a UserLookup if it implements the interface.
|
// GetUserLookup returns the DB as a UserLookup if it implements the interface.
|
||||||
func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn // interface return is intentional
|
func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn
|
||||||
if ul, ok := b.db.(UserLookup); ok {
|
if ul, ok := b.db.(UserLookup); ok {
|
||||||
return ul
|
return ul
|
||||||
}
|
}
|
||||||
@@ -56,7 +56,7 @@ func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn // interface return
|
|||||||
}
|
}
|
||||||
|
|
||||||
// GetChannelLookup returns the DB as a ChannelLookup if it implements the interface.
|
// GetChannelLookup returns the DB as a ChannelLookup if it implements the interface.
|
||||||
func (b *Base) GetChannelLookup() ChannelLookup { //nolint:ireturn // interface return is intentional
|
func (b *Base) GetChannelLookup() ChannelLookup { //nolint:ireturn
|
||||||
if cl, ok := b.db.(ChannelLookup); ok {
|
if cl, ok := b.db.(ChannelLookup); ok {
|
||||||
return cl
|
return cl
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user