forked from Mirrors/oauth2
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…
Reference in New Issue