Closed thepwagner closed 2 years ago
Update the client package to prefer NewClient() with functional options.
client
NewClient()
This removes the need for multiple constructors (we were up to 3):
NewAuthClient
NewCustomClient
This removes the need for SetFooBar() post-construction intializers (we were up to 2):
SetFooBar()
SetBasicAuth
SetUserAgent
The highest risk change here is to the voucher-client binary, where getVoucherClient() is refactored to build []client.Options and fall-through.
voucher-client
getVoucherClient()
[]client.Options
Update the
client
package to preferNewClient()
with functional options.This removes the need for multiple constructors (we were up to 3):
NewAuthClient
is marked deprecatedNewCustomClient
, which was recently introduced by https://github.com/grafeas/voucher/pull/53 , is removed.This removes the need for
SetFooBar()
post-construction intializers (we were up to 2):SetBasicAuth
is marked deprecatedSetUserAgent
, which was recently added by https://github.com/grafeas/voucher/pull/52 , is removed.The highest risk change here is to the
voucher-client
binary, wheregetVoucherClient()
is refactored to build[]client.Options
and fall-through.Related