fix: resolve ireturn lint issues
This commit is contained in:
@@ -48,7 +48,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 {
|
func (b *Base) GetUserLookup() UserLookup { //nolint:ireturn // intentional interface return for dependency inversion
|
||||||
if ul, ok := b.db.(UserLookup); ok {
|
if ul, ok := b.db.(UserLookup); ok {
|
||||||
return ul
|
return ul
|
||||||
}
|
}
|
||||||
@@ -57,7 +57,7 @@ func (b *Base) GetUserLookup() UserLookup {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// 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 {
|
func (b *Base) GetChannelLookup() ChannelLookup { //nolint:ireturn // intentional interface return for dependency inversion
|
||||||
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