2 Commits

Author SHA1 Message Date
5966e185d4 use latest linter 2026-08-31 22:04:51 +02:00
49eb1033ef satisfy linter 2026-08-31 22:02:07 +02:00
3 changed files with 1 additions and 17 deletions

View File

@@ -92,14 +92,6 @@ func New(file string, bucket string, debug bool) (*DB, error) {
return &DB{Debug: debug, Dbfile: file, Bucket: bucket}, nil
}
func (db *DB) Exists() error {
if !common.FileExists(db.Dbfile) {
return fmt.Errorf("db file %s doesn't exist", db.Dbfile)
}
return nil
}
func (db *DB) Open() error {
slog.Debug("opening DB", "dbfile", db.Dbfile)

View File

@@ -30,7 +30,7 @@ import (
"github.com/tlinden/yadu"
)
var Version string = "v0.3.2"
var Version string = "v0.3.1"
type BucketConfig struct {
Encrypt bool

View File

@@ -107,10 +107,6 @@ func Get(conf *cfg.Config) *cobra.Command {
attr.Key = args[0]
}
if err := conf.DB.Exists(); err != nil {
return err
}
entry, err := conf.DB.Get(&attr)
if err != nil {
return err
@@ -212,10 +208,6 @@ func List(conf *cfg.Config) *cobra.Command {
conf.Mode = "wide"
}
if err := conf.DB.Exists(); err != nil {
return err
}
entries, err := conf.DB.List(&attr, conf.Fulltext)
if err != nil {
return err