diff options
| author | Paul Buetow <paul@buetow.org> | 2024-10-22 21:52:16 +0300 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2024-10-22 21:52:16 +0300 |
| commit | a3b5d7ae6309bf84e4d29b9d312a0ae82eb9be12 (patch) | |
| tree | 16a42836fe5d3e70eb4e9c848e63ee51b432e175 /internal/run.go | |
| parent | 66327b1e5b03eb8f3eeb178e385c902e18afecae (diff) | |
refactor
Diffstat (limited to 'internal/run.go')
| -rw-r--r-- | internal/run.go | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/internal/run.go b/internal/run.go index 3689667..98fb501 100644 --- a/internal/run.go +++ b/internal/run.go @@ -13,6 +13,7 @@ import ( "codeberg.org/snonux/gos/internal/prompt" "codeberg.org/snonux/gos/internal/queue" "codeberg.org/snonux/gos/internal/schedule" + "github.com/fatih/color" ) func Run(ctx context.Context, args config.Args) error { @@ -60,7 +61,10 @@ func runPlatform(ctx context.Context, args config.Args, platform string, sizeLim if err := postCB(ctx, args, sizeLimit, ent); err != nil { return err } + if err := ent.MarkPosted(); err != nil { + return err + } - log.Println("Posted", ent, "to", platform) - return ent.MarkPosted() + color.New(color.FgWhite, color.BgGreen).Println("Successfully posted message to ", platform) + return nil } |
