rewrite checkpoint

This commit is contained in:
Cory Bennett
2017-08-13 18:23:38 -07:00
parent b00021ccbd
commit 36632a52f0
883 changed files with 222856 additions and 2972 deletions
+22
View File
@@ -0,0 +1,22 @@
package jira
import (
"encoding/json"
"fmt"
"io"
"io/ioutil"
"github.com/pkg/errors"
)
func readJSON(input io.Reader, data interface{}) error {
content, err := ioutil.ReadAll(input)
if err != nil {
return err
}
err = json.Unmarshal(content, data)
if err != nil {
return errors.Wrap(err, fmt.Sprintf("JSON Parse Error: %s from %s", err, content))
}
return nil
}