summaryrefslogtreecommitdiff
path: root/internal/entry/entry.go
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-11-22 23:48:28 +0200
committerPaul Buetow <paul@buetow.org>2024-11-22 23:48:28 +0200
commitc095b7fb273eed04cae0d42cae2d534cf74cfd9e (patch)
tree7b12d51cae47a070622db6eb09539a31be8f0f69 /internal/entry/entry.go
parentfaf7569ab307eff706e4ccf2ed92eec5c93f67eb (diff)
some stuff all around
Diffstat (limited to 'internal/entry/entry.go')
-rw-r--r--internal/entry/entry.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/internal/entry/entry.go b/internal/entry/entry.go
index 25fb44a..d767410 100644
--- a/internal/entry/entry.go
+++ b/internal/entry/entry.go
@@ -11,7 +11,6 @@ import (
"codeberg.org/snonux/gos/internal/config"
"codeberg.org/snonux/gos/internal/oi"
- "codeberg.org/snonux/gos/internal/platforms"
"codeberg.org/snonux/gos/internal/prompt"
"codeberg.org/snonux/gos/internal/timestamp"
)
@@ -155,10 +154,10 @@ func (en Entry) HasTag(tag string) bool {
// Valid tags are: share:foo[,...]
// whereas foo can be a supported plutform such as linkedin, mastodon, etc.
// foo can also be prefixed with - to exclude it. See unit tests for examples.
-func (en Entry) PlatformExcluded(args config.Args, platform platforms.Platform) (bool, error) {
+func (en Entry) PlatformExcluded(args config.Args, platformStr string) (bool, error) {
s, err := newShareTags(args, en.tags)
- return slices.Contains(s.excludes, platform.String()) ||
- !slices.Contains(s.includes, platform.String()), err
+ return slices.Contains(s.excludes, platformStr) ||
+ !slices.Contains(s.includes, platformStr), err
}
func (en Entry) Edit() error {