-
-
Notifications
You must be signed in to change notification settings - Fork 376
Open
Description
If i'm launching my app with fresh, i'm not able to scan user input from the command line. (tested with bufio and others go scanners)
This bunch of code (from https://developers.google.com/gmail/api/quickstart/go) :
authURL := config.AuthCodeURL("state-token", oauth2.AccessTypeOffline)
fmt.Printf("Go to the following link in your browser then type the "+
"authorization code: \n%v\n", authURL)
scanner := bufio.NewScanner(os.Stdin)
scanner.Scan()
err := scanner.Err()
if err != nil {
log.Fatalf("Unable to retrieve authorization code: %v", err)
}
authCode := scanner.Text()
fmt.Printf("Auth code: %s\n", authCode)will never stop (it should stop at "Scan()" on line 5)
If I'm launching my app without fresh this code works.
Do someone knows how can I fix this ?
Thanks a lot
Metadata
Metadata
Assignees
Labels
No labels