mirror of
https://github.com/idanoo/autobrr
synced 2025-07-23 08:49:13 +00:00
feat(logging); improve messages and errors (#336)
* feat(logger): add module context * feat(logger): change errors package * feat(logger): update tests
This commit is contained in:
parent
95471a4cf7
commit
0e88117702
69 changed files with 1172 additions and 957 deletions
|
@ -1,9 +1,8 @@
|
|||
package mock
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
|
||||
"github.com/autobrr/autobrr/internal/domain"
|
||||
"github.com/autobrr/autobrr/pkg/errors"
|
||||
)
|
||||
|
||||
type IndexerApiClient interface {
|
||||
|
@ -27,7 +26,7 @@ func NewMockClient(url string, apiKey string) IndexerApiClient {
|
|||
|
||||
func (c *IndexerClient) GetTorrentByID(torrentID string) (*domain.TorrentBasic, error) {
|
||||
if torrentID == "" {
|
||||
return nil, fmt.Errorf("mock client: must have torrentID")
|
||||
return nil, errors.New("mock client: must have torrentID")
|
||||
}
|
||||
|
||||
r := &domain.TorrentBasic{
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue