Skip to content

Commit 7b4880b

Browse files
authored
clarified comment on Response.Request (#117)
1 parent 1d2c213 commit 7b4880b

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

cassette/track/http.go

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -189,11 +189,13 @@ type Response struct {
189189
Trailer http.Header
190190
TLS *tls.ConnectionState
191191

192-
// Request is nil when recording a track to the cassette.
192+
// govcr initially sets Request to nil when recording a track to the cassette.
193+
// It is only possible to force a value to cassette through a track record mutator.
193194
// At _replaying_ _time_ _only_ it will be populated with the "current" HTTP request.
194195
// This is useful in scenarios where the request contains a dynamic piece of information
195196
// such as e.g. a transaction ID, a customer number, etc.
196-
// This is solely for informational purpose at replaying time. Mutating it achieves nothing.
197+
// This is solely for informational purpose at replaying time.
198+
// Mutating it at replay time typically achieves nothing very useful.
197199
Request *Request
198200
}
199201

0 commit comments

Comments
 (0)