summaryrefslogtreecommitdiff
path: root/internal/config
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2024-10-17 10:38:40 +0300
committerPaul Buetow <paul@buetow.org>2024-10-17 10:38:40 +0300
commit563ea5dbaaa77e59939812d6825d54cf829db8eb (patch)
tree1518d99868e86357f4ae81c0946f209adad4d8c1 /internal/config
parenta66b2114ee9fb9078d6f3c12566d7178e0662903 (diff)
implement sizeLimit per platform
Diffstat (limited to 'internal/config')
-rw-r--r--internal/config/args.go4
1 files changed, 2 insertions, 2 deletions
diff --git a/internal/config/args.go b/internal/config/args.go
index 3bfa78e..47712f9 100644
--- a/internal/config/args.go
+++ b/internal/config/args.go
@@ -12,7 +12,7 @@ var validPlatforms = []string{"mastodon", "linkedin"}
type Args struct {
GosDir string
DryRun bool
- Platforms []string
+ Platforms map[string]int // Platform name and post size limits
Target int
Lookback time.Duration
SecretsConfigPath string
@@ -21,7 +21,7 @@ type Args struct {
}
func (a Args) Validate() error {
- for _, platform := range a.Platforms {
+ for platform := range a.Platforms {
if !slices.Contains(validPlatforms, strings.ToLower(platform)) {
return fmt.Errorf("Platform %s not supported", platform)
}