From a3672d28b3620cc46bf5165f4effca3cd4250157 Mon Sep 17 00:00:00 2001 From: Tobie Morgan Hitchcock Date: Tue, 6 Sep 2016 14:32:21 +0100 Subject: [PATCH] Return CKError instead of custom error when encryption fails --- kvs/db.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/kvs/db.go b/kvs/db.go index dc4b1f05..0989670f 100644 --- a/kvs/db.go +++ b/kvs/db.go @@ -15,7 +15,6 @@ package kvs import ( - "fmt" "strings" "github.com/abcum/surreal/cnf" @@ -74,7 +73,7 @@ func (db *DB) enc(opts *cnf.Options) (err error) { } if kv.Exists() == true && kv.Str() != "±" { - err = fmt.Errorf("Please provide a valid encryption key for the stored data.") + err = new(CKError) } return