Skip to content

Commit

Permalink
xdb update
Browse files Browse the repository at this point in the history
  • Loading branch information
jc3wish authored and jc3wish committed Oct 27, 2019
1 parent f68837d commit 4b774c1
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion xdb/leveldb/leveldb.go
Original file line number Diff line number Diff line change
Expand Up @@ -51,7 +51,7 @@ func (This *Conn) Close() (error){
func (This *Conn) GetKeyVal(key []byte) ([]byte,error){
s, err := This.levelDB.Get(key, nil)
if err != nil && strings.Contains(err.Error(),"not found"){
return []byte(""),err
return nil,nil
}
return s,err
}
Expand Down
2 changes: 1 addition & 1 deletion xdb/redis/redis.go
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ func (This *Conn) GetKeyVal(key []byte) ([]byte,error){
s,err := f.Bytes()
if err != nil{
if err.Error() == "redis: nil"{
return []byte(""),nil
return nil,nil
}
This.Close()
return nil,err
Expand Down

0 comments on commit 4b774c1

Please sign in to comment.