summaryrefslogtreecommitdiff
path: root/internal/platforms/linkedin/oauth2
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-12-11 22:07:51 +0200
committerPaul Buetow <paul@buetow.org>2024-12-11 22:07:51 +0200
commit1dca76e728a70b70ee8001c87407acf962e731cd (patch)
tree4636d5b8769595de135bca8977b951d0a570da48 /internal/platforms/linkedin/oauth2
parenta5529938536f7a530f0c55e5a82b16a4c80af5b4 (diff)
refactor a bit again
Diffstat (limited to 'internal/platforms/linkedin/oauth2')
-rw-r--r--internal/platforms/linkedin/oauth2/oauth2.go10
1 files changed, 5 insertions, 5 deletions
diff --git a/internal/platforms/linkedin/oauth2/oauth2.go b/internal/platforms/linkedin/oauth2/oauth2.go
index f37e913..51beec9 100644
--- a/internal/platforms/linkedin/oauth2/oauth2.go
+++ b/internal/platforms/linkedin/oauth2/oauth2.go
@@ -72,7 +72,7 @@ func oauthCallbackHandler(w http.ResponseWriter, r *http.Request) {
defer close(errCh)
code := r.URL.Query().Get("code")
- _, _ = colour.Infoln("Exchanging OAuth2 token")
+ colour.Infoln("Exchanging OAuth2 token")
token, err := oauthConfig.Exchange(globalCtx, code)
if err != nil {
_, _ = w.Write([]byte(err.Error()))
@@ -110,7 +110,7 @@ func LinkedInCreds(ctx context.Context, args config.Args) (string, string, error
http.HandleFunc("/callback", oauthCallbackHandler)
http.HandleFunc("/up", upHandler)
- _, _ = colour.Infoln("Listening on http://localhost:8080 for LinkedIn OAuth2")
+ colour.Infoln("Listening on http://localhost:8080 for LinkedIn OAuth2")
go func() {
if err := http.ListenAndServe(":8080", nil); err != nil {
errCh <- err
@@ -139,7 +139,7 @@ func LinkedInCreds(ctx context.Context, args config.Args) (string, string, error
}
func openURLInFirefox(browser, url string) error {
- _, _ = colour.Infoln("Opening", url, "in", browser)
+ colour.Infoln("Opening", url, "in", browser)
switch runtime.GOOS {
case "windows":
cmd := exec.Command("cmd", "/C", "start", browser, url)
@@ -162,10 +162,10 @@ func WaitUntilURLIsReachable(url string) error {
resp, err := http.Get(url)
if err != nil {
- _, _ = colour.Infof("URL is not reachable: %v", err)
+ colour.Infof("URL is not reachable: %v", err)
fmt.Print("\n")
} else {
- _, _ = colour.Infof("URL is reachable: %s - Status Code: %d", url, resp.StatusCode)
+ colour.Infof("URL is reachable: %s - Status Code: %d", url, resp.StatusCode)
fmt.Print("\n")
resp.Body.Close()
return nil