Decode to both the struct and a map and add access (#349)
This will allow for better TF integration.
This commit is contained in:
1 parent
c689af4306
commit
b7524f8cfb
25 files changed
+311
-4
No files matched your search
@@ -555,6 +555,17 @@ import (
|
||||
|
||||
type {{ .Name }} struct { {{ range .Fields }}
|
||||
{{ .Name }} {{ .FieldType }} `, "`json:\"{{ .ProtoName }},omitempty\"`", `{{ end }}
|
||||
|
||||
lastResponseBody *bytes.Buffer
|
||||
lastResponseMap map[string]interface{}
|
||||
}
|
||||
|
||||
func (n {{ .Name }}) LastResponseBody() *bytes.Buffer {
|
||||
return n.lastResponseBody
|
||||
}
|
||||
|
||||
func (n {{ .Name }}) LastResponseMap() map[string]interface{} {
|
||||
return n.lastResponseMap
|
||||
}
|
||||
`)))
|
||||
|
||||
|
||||
Reference in new issue
Block a user