result
import "github.com/SuperBuker/terraform-provider-dns-he-net/client/client/result"
Index
func Body(resp *resty.Response) *html.Node
Returns the parsed HTML body from the go-resty Response. If the Request.Result contains a ResultX, it returns the HTML body from it, otherwise it parses the body and returns the result.
func Init(resp *resty.Response) (err error)
Init initialises the go-resty Request.Result with a ResultX contaning the parsed HTML body and the expected result, if any. Returns an error if the parsing fails
func Result(resp *resty.Response) interface{}
Returns the Result() the go-resty Response. If the Request.Result contains a ResultX, it returns the inner Result.
ResultX repurposes go-resty Request.Result to persist a copy of the parsed HTML body. This way we prevent the parsing to be performed on each step of the HTML analysis.
type ResultX struct {
HTML *html.Node
Result interface{}
}
Generated by gomarkdoc