summaryrefslogtreecommitdiff
path: root/internal/platforms/linkedin/linkedin.go
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/linkedin.go
parenta5529938536f7a530f0c55e5a82b16a4c80af5b4 (diff)
refactor a bit again
Diffstat (limited to 'internal/platforms/linkedin/linkedin.go')
-rw-r--r--internal/platforms/linkedin/linkedin.go7
1 files changed, 2 insertions, 5 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go
index b960c01..85b95af 100644
--- a/internal/platforms/linkedin/linkedin.go
+++ b/internal/platforms/linkedin/linkedin.go
@@ -25,9 +25,7 @@ const linkedInTimeout = 10 * time.Second
func Post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry) error {
err := post(ctx, args, sizeLimit, en)
if errors.Is(err, errUnauthorized) {
- if _, err = colour.Infoln(err, "=> trying to refresh LinkedIn access token"); err != nil {
- return err
- }
+ colour.Infoln(err, "=> trying to refresh LinkedIn access token")
args.Secrets.LinkedInAccessToken = "" // Reset the token
return post(ctx, args, sizeLimit, en)
}
@@ -36,8 +34,7 @@ func Post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry)
func post(ctx context.Context, args config.Args, sizeLimit int, en entry.Entry) error {
if args.DryRun {
- _, err := colour.Infoln("Not posting", en, "to LinkedIn as dry-run enabled")
- return err
+ colour.Infoln("Not posting", en, "to LinkedIn as dry-run enabled")
}
timeout := linkedInTimeout