Handle scan error.
This commit is contained in:
@@ -32,7 +32,9 @@ func Example_config() {
|
|||||||
// an access token and iniate a Transport that is
|
// an access token and iniate a Transport that is
|
||||||
// authorized and authenticated the retrieved token.
|
// authorized and authenticated the retrieved token.
|
||||||
var exchangeCode string
|
var exchangeCode string
|
||||||
fmt.Scan(&exchangeCode)
|
if _, err = fmt.Scan(&exchangeCode); err != nil {
|
||||||
|
log.Fatal(err)
|
||||||
|
}
|
||||||
t, err := conf.NewTransportWithCode(exchangeCode)
|
t, err := conf.NewTransportWithCode(exchangeCode)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
|
|||||||
Reference in New Issue
Block a user