v1.2.0
New features:
NewNotFoundResponderhelps to detect a possible path mistake (final/or double/cases);- add
(*MockTransport).Respondersmethod allowing to list registered responders.
Fixes:
-
url.RawPathis used instead ofurl.Pathwhen checking path alone for consistency with full URL check, which is always unescaped.
Let 2 registered responders:GET http://z.tld/foo%2fbarGET /foo%2fbar
Before this release:
GET http://z.tld/foo%2fbaris caught by 1GET http://unknown.tld/foo%2fbaris not caught as the tested path is/foo/barinstead of/foo%2fbar
From this release:
GET http://z.tld/foo%2fbaris caught by 1GET http://unknown.tld/foo%2fbaris caught by 2
-
save of old clients transports is now protected from concurrent writes (@roboslone).
Miscellaneous:
- now use go-testdeep to simplify tests (saves >500 test lines);
- go minimal version required is now 1.9;
- CI tests using go1.18 & golangci-lint v1.45.0;
- signatures (and so documentation) now use
anytype instead ofinterface{}, as appeared in go 1.18 (in a compatible manner with go<1.18).
Enjoy!