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:
Ludvig Lundgren 2022-07-05 13:31:44 +02:00 committed by GitHub
parent 95471a4cf7
commit 0e88117702
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
69 changed files with 1172 additions and 957 deletions

View file

@ -8,12 +8,13 @@ import (
"log"
"os"
"golang.org/x/crypto/ssh/terminal"
_ "modernc.org/sqlite"
"github.com/autobrr/autobrr/internal/database"
"github.com/autobrr/autobrr/internal/domain"
"github.com/autobrr/autobrr/pkg/argon2id"
"github.com/autobrr/autobrr/pkg/errors"
"golang.org/x/crypto/ssh/terminal"
_ "modernc.org/sqlite"
)
const usage = `usage: autobrrctl --config path <action>
@ -131,7 +132,7 @@ func readPassword() ([]byte, error) {
password = scanner.Bytes()
if len(password) == 0 {
return nil, fmt.Errorf("zero length password")
return nil, errors.New("zero length password")
}
}