diff --git a/kwallet.go b/kwallet.go index 1e5a16e..7dd3508 100644 --- a/kwallet.go +++ b/kwallet.go @@ -90,6 +90,10 @@ func (k *kwalletKeyring) Get(key string) (Item, error) { if err != nil { return Item{}, err } + if len(data) == 0 { + return Item{}, ErrKeyNotFound + } + item := Item{} err = json.Unmarshal(data, &item)