mirror of
https://github.com/golang/oauth2.git
synced 2025-07-21 00:00:09 +08:00
Handle scan error.
This commit is contained in:
parent
fe0eecc41c
commit
f156f2868e
@ -32,7 +32,9 @@ func Example_config() {
|
||||
// an access token and iniate a Transport that is
|
||||
// authorized and authenticated the retrieved token.
|
||||
var exchangeCode string
|
||||
fmt.Scan(&exchangeCode)
|
||||
if _, err = fmt.Scan(&exchangeCode); err != nil {
|
||||
log.Fatal(err)
|
||||
}
|
||||
t, err := conf.NewTransportWithCode(exchangeCode)
|
||||
if err != nil {
|
||||
log.Fatal(err)
|
||||
|
Loading…
x
Reference in New Issue
Block a user