fix IssueAssign

This commit is contained in:
Cory Bennett
2017-08-20 23:08:45 -05:00
parent 19d8686c01
commit f32cc7079c
2 changed files with 5 additions and 4 deletions
+4 -3
View File
@@ -5,8 +5,6 @@ import (
"fmt"
"io"
"io/ioutil"
"github.com/pkg/errors"
)
func readJSON(input io.Reader, data interface{}) error {
@@ -14,9 +12,12 @@ func readJSON(input io.Reader, data interface{}) error {
if err != nil {
return err
}
if len(content) == 0 {
return nil
}
err = json.Unmarshal(content, data)
if err != nil {
return errors.Wrap(err, fmt.Sprintf("JSON Parse Error: %s from %s", err, content))
return fmt.Errorf("JSON Parse Error: %s from %q", err, content)
}
return nil
}