Remove FromEnv option, a few todos
Signed-off-by: Vartan Benohanian <vartanbeno@gmail.com>
This commit is contained in:
+5
-5
@@ -119,6 +119,11 @@ func NewClient(creds *Credentials, opts ...Opt) (*Client, error) {
|
||||
}
|
||||
|
||||
client := newClient()
|
||||
client.ID = creds.ID
|
||||
client.Secret = creds.Secret
|
||||
client.Username = creds.Username
|
||||
client.Password = creds.Password
|
||||
|
||||
for _, opt := range opts {
|
||||
if err := opt(client); err != nil {
|
||||
return nil, err
|
||||
@@ -156,11 +161,6 @@ func NewClient(creds *Credentials, opts ...Opt) (*Client, error) {
|
||||
}
|
||||
}
|
||||
|
||||
client.ID = creds.ID
|
||||
client.Secret = creds.Secret
|
||||
client.Username = creds.Username
|
||||
client.Password = creds.Password
|
||||
|
||||
oauthTransport := oauthTransport(client)
|
||||
client.client.Transport = oauthTransport
|
||||
|
||||
|
||||
Reference in New Issue
Block a user