Add Result types to Go SDK and properly populate body/map fields (#358)

This commit is contained in:
Jeff Mitchell authored and GitHub committed 2020-09-15 01:08:21 -04:00
1 parent d8dc1ed0b2
commit a00ee7a948
61 files changed
+1888 -1099

No files matched your search

+6 -6
View File
@@ -9,14 +9,14 @@ type Error struct {
Message string `json:"message,omitempty"`
Details *ErrorDetails `json:"details,omitempty"`
lastResponseBody *bytes.Buffer
lastResponseMap map[string]interface{}
responseBody *bytes.Buffer
responseMap map[string]interface{}
}
func (n Error) LastResponseBody() *bytes.Buffer {
return n.lastResponseBody
func (n Error) ResponseBody() *bytes.Buffer {
return n.responseBody
}
func (n Error) LastResponseMap() map[string]interface{} {
return n.lastResponseMap
func (n Error) ResponseMap() map[string]interface{} {
return n.responseMap
}