This standardizes the method for exchanging a voucher.Request for a voucher.Response, avoiding duplication between the Check() and Verify() functions.
the url.go file is removed, with helpers moving closer to their functionality (e.g. toVoucherVerifyURL moves to verify.go).
a check.go file is introduced, mirroring verify.go
the client.go file is concerned only with shared functionality
a httptest.Server-based test is added to validate the client
There is one breaking change: SignImage() is a helper to create a client and request a response. Since it doesn't support authentication, I think it's of little value.
Semver would suggest SignImage()should be deprecated until v3: I'm making a wild hunch that nobody is using it and opting to YOLO.
This standardizes the method for exchanging a
voucher.Request
for avoucher.Response
, avoiding duplication between theCheck()
andVerify()
functions.url.go
file is removed, with helpers moving closer to their functionality (e.g.toVoucherVerifyURL
moves toverify.go
).check.go
file is introduced, mirroringverify.go
client.go
file is concerned only with shared functionalityhttptest.Server
-based test is added to validate the clientThere is one breaking change:
SignImage()
is a helper to create a client and request a response. Since it doesn't support authentication, I think it's of little value. Semver would suggestSignImage()
should be deprecated untilv3
: I'm making a wild hunch that nobody is using it and opting to YOLO.