diff --git a/cmd/chat-cli/api/client.go b/cmd/chat-cli/api/client.go index fee4051..762b39e 100644 --- a/cmd/chat-cli/api/client.go +++ b/cmd/chat-cli/api/client.go @@ -1,5 +1,5 @@ -// Package api provides a client for the chat server HTTP API. -package api +// Package chatapi provides a client for the chat server HTTP API. +package chatapi import ( "bytes" diff --git a/cmd/chat-cli/api/types.go b/cmd/chat-cli/api/types.go index 12d223b..011ad8e 100644 --- a/cmd/chat-cli/api/types.go +++ b/cmd/chat-cli/api/types.go @@ -1,4 +1,4 @@ -package api //nolint:revive // package name is intentional +package chatapi import "time" diff --git a/cmd/chat-cli/main.go b/cmd/chat-cli/main.go index 37af8f3..d57b359 100644 --- a/cmd/chat-cli/main.go +++ b/cmd/chat-cli/main.go @@ -9,7 +9,7 @@ import ( "sync" "time" - "git.eeqj.de/sneak/chat/cmd/chat-cli/api" + api "git.eeqj.de/sneak/chat/cmd/chat-cli/api" ) const ( diff --git a/internal/models/model.go b/internal/models/model.go index 302f6b3..fdaa90f 100644 --- a/internal/models/model.go +++ b/internal/models/model.go @@ -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 // interface return is intentional +func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn if ul, ok := b.db.(UserLookup); ok { 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. -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 { return cl }