Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
View Source
var AppFS = afero.NewOsFs()
AppFS is the filesystem used by the golden package.
Functions ¶
This section is empty.
Types ¶
type Golden ¶
type Golden struct { // WantStatus is the expected response status code. WantStatus int // WantHeaders are the expected response headers. // // If MatchHeadersExactly is set to true, any unexpected headers will cause // the test utilizing this golden file to fail. WantHeaders http.Header // WantBody is the expected response body. If the body is a JSON object // and MatchBodyJSONExactly is set to true, the JSON is expected to exactly // match exactly, and any unexpected JSON keys or values will cause the test // utilizing this golden file to fail. WantBody any // MatchHeadersExactly determines whether or not unexpected headers will cause // a test utilizing this golden file to fail. MatchHeadersExactly bool // MatchBodyJSONExactly determines whether or not unexpected JSON keys or values // will cause a test utilizing this golden file to fail. MatchBodyJSONExactly bool }
Golden represents the contents of a golden file.
Click to show internal directories.
Click to hide internal directories.