[Rest Client] Use options for client.New#463
Conversation
Pull Request Test Coverage Report for Build 7652203560
💛 - Coveralls |
25ad68a to
3506e84
Compare
|
The problem with this implementation is that the |
|
Thanks for the link @jhillyerd Actually, I can just make ClientOpts small and then it is not exposed, and still works. It looks like ubers argument is: I can change from the pattern with closure to the one you and uber use with apply 👍 Looks like they used to use the closure approach but changed uber-go/guide#74 |
Signed-off-by: Corey Aloia <[email protected]>
Signed-off-by: Corey Aloia <[email protected]>
Signed-off-by: Corey Aloia <[email protected]>
Signed-off-by: Corey Aloia <[email protected]>
Signed-off-by: Corey Aloia <[email protected]>
Signed-off-by: Corey Aloia <[email protected]>
e72de94 to
d1384a8
Compare
|
Looks good, but apologies, I should have mentioned this before: What do you think about dropping the Client name prefix from most of the types/funcs you are introducing? I know the existing client.Client type has repetition in it, but I think we could use client.Option interface and client.WithOptTransport instead. |
Good point.... client.client* is repetitive, I also thought about changing but didnt for some reason 😄 .... will adjust 👍 |
Signed-off-by: Corey Aloia <[email protected]>
|
Thanks a bunch! |
The rest client does not currently allow a user to pass options, such as a custom transport. This PR extends the
client.Newfunction to allow for custom options to be passed