forked from Mirrors/oauth2
Merge pull request #31 from subosito/new-transport-example
fixed NewTransport example code
This commit is contained in:
commit
3561f0ea82
|
@ -160,11 +160,6 @@ func (c *Config) AuthCodeURL(state string) (authURL string) {
|
||||||
// initialize the new transport with a token, so after creation,
|
// initialize the new transport with a token, so after creation,
|
||||||
// you need to set a valid token (or an expired token with a valid
|
// you need to set a valid token (or an expired token with a valid
|
||||||
// refresh token) in order to be able to do authorized requests.
|
// refresh token) in order to be able to do authorized requests.
|
||||||
//
|
|
||||||
// Example:
|
|
||||||
// t, _ := c.NewTransport()
|
|
||||||
// t.SetToken(validToken)
|
|
||||||
//
|
|
||||||
func (c *Config) NewTransport() *Transport {
|
func (c *Config) NewTransport() *Transport {
|
||||||
return NewTransport(c.Transport, c, nil)
|
return NewTransport(c.Transport, c, nil)
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue