Skip to content

Commit

Permalink
Merge pull request #15 from ieee0824/fix
Browse files Browse the repository at this point in the history
fix nil bug
  • Loading branch information
ieee0824 authored Oct 12, 2017
2 parents fc3eba2 + 188cc93 commit 970fdd9
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions cryptex.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ import (
"encoding/base64"
"encoding/json"
"errors"
"fmt"
"github.com/ghodss/yaml"
"github.com/ieee0824/cryptex/encryptor"
"io/ioutil"
Expand Down Expand Up @@ -196,6 +197,9 @@ func (c *Cryptex) Decrypt(d *Container) (interface{}, error) {
}

func (c *Cryptex) Edit(i *Container) (interface{}, error) {
if i == nil || i.Values == nil {
return nil, fmt.Errorf("container is empty")
}
p, err := c.decrypt(i.Values)
if err != nil {
return nil, err
Expand Down

0 comments on commit 970fdd9

Please sign in to comment.