From fe972295d2c1a4c4a4495e6c20dc807c7054d38a Mon Sep 17 00:00:00 2001 From: seborama Date: Thu, 25 Oct 2018 00:16:06 +0100 Subject: [PATCH] Removed last remains of ExcludeHeaderFunc and bug fixes --- examples/example4.go | 4 ++-- request.go | 3 --- 2 files changed, 2 insertions(+), 5 deletions(-) diff --git a/examples/example4.go b/examples/example4.go index 6741be9..d0e8df9 100644 --- a/examples/example4.go +++ b/examples/example4.go @@ -14,13 +14,13 @@ const example4CassetteName = "MyCassette4" // The request contains a customer header 'X-Custom-My-Date' which varies with every request. // This example shows how to exclude a particular header from the request to facilitate // matching a previous recording. -// Without the ExcludeHeaderFunc, the headers would not match and hence the playback would not +// Without the RequestFilters, the headers would not match and hence the playback would not // happen! func Example4() { vcr := govcr.NewVCR(example4CassetteName, &govcr.VCRConfig{ RequestFilters: govcr.RequestFilters{ - govcr.RequestDeleteHeaderKeys("X-Transaction-Id"), + govcr.RequestDeleteHeaderKeys("X-Custom-My-Date"), }, Logging: true, }) diff --git a/request.go b/request.go index 9b3a3c4..abd0350 100644 --- a/request.go +++ b/request.go @@ -12,9 +12,6 @@ import ( // the header / body, you likely want to remove it or force a static timestamp via // RequestFilterFunc to ensure that the request body matches those saved on the cassette's track. // -// It is important to note that this differs from ExcludeHeaderFunc in that the former does not -// modify the header (it only returns a bool) whereas this function can be used to modify the header. -// // A Filter should return the request with any modified values. type RequestFilter func(req Request) Request