From 2b96cfe1b629e5cf3612bfba572d51b231628a67 Mon Sep 17 00:00:00 2001 From: Brian Buller Date: Tue, 6 Apr 2021 16:41:36 -0500 Subject: [PATCH] Fix GetByte --- boltease.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/boltease.go b/boltease.go index fbc5089..c42dde1 100644 --- a/boltease.go +++ b/boltease.go @@ -122,6 +122,9 @@ func (b *DB) GetBytes(path []string, key string) ([]byte, error) { } // newBkt should have the last bucket in the path val := bkt.Get([]byte(key)) + if val == nil { + return fmt.Errorf("Couldn't find value") + } ret = make([]byte, len(val)) copy(ret, val) return nil