summaryrefslogtreecommitdiff
path: root/internal/platforms/linkedin
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-10-09 23:52:54 +0300
committerPaul Buetow <paul@buetow.org>2024-10-09 23:52:54 +0300
commitbe3abe2462bca511ede21cacd1e5a3690b5aa745 (patch)
tree7028dfbd0ffe9f386ff7605ef544470db09cd766 /internal/platforms/linkedin
parentaf7c12e5d42b6a19fd657138862ca6db6942d402 (diff)
refator
Diffstat (limited to 'internal/platforms/linkedin')
-rw-r--r--internal/platforms/linkedin/linkedin.go4
1 files changed, 4 insertions, 0 deletions
diff --git a/internal/platforms/linkedin/linkedin.go b/internal/platforms/linkedin/linkedin.go
index ce30970..401d5a3 100644
--- a/internal/platforms/linkedin/linkedin.go
+++ b/internal/platforms/linkedin/linkedin.go
@@ -31,6 +31,10 @@ func Post(ctx context.Context, args config.Args, ent entry.Entry) error {
}
func post(ctx context.Context, args config.Args, ent entry.Entry) error {
+ if args.DryRun {
+ log.Println("Not posting", ent, "to LinkedIn as dry-run enabled")
+ return nil
+ }
personID, accessToken, err := oauth2.LinkedInCreds(args)
if err != err {
return err