From 563ea5dbaaa77e59939812d6825d54cf829db8eb Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Thu, 17 Oct 2024 10:38:40 +0300 Subject: implement sizeLimit per platform --- internal/config/args.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) (limited to 'internal/config') 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) } -- cgit v1.2.3