@@ -126,7 +126,7 @@ func startWebServer(redirectURL string) chan string {
126
126
_ = listener .Close ()
127
127
w .Header ().Set ("Content-Type" , "text/plain" )
128
128
_ , _ = fmt .Fprintf (
129
- w , "Received code: %v \r \n You can now safely close this window." , code ,
129
+ w , "Received code: %s \r \n You can now safely close this window." , code ,
130
130
)
131
131
},
132
132
),
@@ -138,7 +138,7 @@ func startWebServer(redirectURL string) chan string {
138
138
func getCodeFromPrompt (authURL string ) (code string ) {
139
139
fmt .Printf (
140
140
"It seems that your browser is not open. Go to the following " +
141
- "link in your browser:\n %v \n " , authURL ,
141
+ "link in your browser:\n %s \n " , authURL ,
142
142
)
143
143
fmt .Print (manualInputHint )
144
144
_ , err := fmt .Scan (& code )
@@ -159,7 +159,7 @@ func getTokenFromWeb(config *oauth2.Config, authURL string) *oauth2.Token {
159
159
if err := utils .OpenURL (authURL ); err == nil {
160
160
fmt .Printf (
161
161
"Your browser has been opened to an authorization URL. This " +
162
- "program will resume once authorization has been provided.\n %v \n " ,
162
+ "program will resume once authorization has been provided.\n %s \n " ,
163
163
authURL ,
164
164
)
165
165
code = <- codeCh
@@ -169,7 +169,7 @@ func getTokenFromWeb(config *oauth2.Config, authURL string) *oauth2.Token {
169
169
code = getCodeFromPrompt (authURL )
170
170
}
171
171
172
- fmt .Printf ("Authorization code generated: %v \n " , code )
172
+ fmt .Printf ("Authorization code generated: %s \n " , code )
173
173
token , err := config .Exchange (context .TODO (), code )
174
174
if err != nil {
175
175
log .Fatalln (errors .Join (errExchange , err ))
0 commit comments