Handle scan error.

This commit is contained in:
Burcu Dogan 2014-06-24 13:26:45 -07:00
parent fe0eecc41c
commit f156f2868e
1 changed files with 3 additions and 1 deletions

View File

@ -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)