Unverified Commit cfebd64b authored by Hanzei's avatar Hanzei Committed by GitHub
Browse files

Codeclimate (#54)

* Remove untested check

* Remove New() call

* Ingore more files for codeclimate
parent 84b03696
......@@ -10,4 +10,9 @@ exclude_patterns:
- ".github/"
- "vendor/"
- "codegen/"
- "*.yml"
- "*.md"
- "Gopkg.*"
- "doc.go"
- ".gitignore"
- "LICENSE"
......@@ -40,10 +40,7 @@ func (m Map) Base64() (string, error) {
}
encoder := base64.NewEncoder(base64.StdEncoding, &buf)
_, err = encoder.Write([]byte(jsonData))
if err != nil {
return "", err
}
_, _ = encoder.Write([]byte(jsonData))
_ = encoder.Close()
return buf.String(), nil
......
......@@ -97,12 +97,12 @@ func MustFromJSON(jsonString string) Map {
//
// Returns an error if the JSON is invalid.
func FromJSON(jsonString string) (Map, error) {
var data interface{}
var data Map
err := json.Unmarshal([]byte(jsonString), &data)
if err != nil {
return Nil, err
}
return New(data), nil
return data, nil
}
// FromBase64 creates a new Obj containing the data specified
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment