From 9b14c12e0ccd5c96dd9f17d1b20fe134308d2184 Mon Sep 17 00:00:00 2001 From: Paul Buetow Date: Fri, 8 Nov 2024 22:52:31 +0200 Subject: refactor --- cmd/gos/main.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) (limited to 'cmd') diff --git a/cmd/gos/main.go b/cmd/gos/main.go index 774dd13..ee7aae7 100644 --- a/cmd/gos/main.go +++ b/cmd/gos/main.go @@ -19,11 +19,10 @@ func main() { dry := flag.Bool("dry", false, "Dry run") version := flag.Bool("version", false, "Display version") gosDir := flag.String("gosDir", filepath.Join(os.Getenv("HOME"), ".gosdir"), "Gos' queue and DB directory") + cacheDir := flag.String("cacheDir", filepath.Join(*gosDir, "cache"), "Go's cache dir") browser := flag.String("browser", "firefox", "OAuth2 browser") secretsConfigPath := filepath.Join(os.Getenv("HOME"), ".config/gos/gosec.json") secretsConfigPath = *flag.String("secretsConfig", secretsConfigPath, "Gos' secret config") - cacheDir := filepath.Join(os.Getenv("HOME"), ".config/gos/cache") - cacheDir = *flag.String("cacheDir", cacheDir, "Go's cache dir") platforms := flag.String("platforms", "Mastodon:500,LinkedIn:1000", "Platforms enabled plus their post size limits") target := flag.Int("target", 2, "How many posts per week are the target?") minQueued := flag.Int("minQueued", 4, "Minimum of queued items until printing a warn message!") @@ -47,7 +46,7 @@ func main() { PauseDays: *pauseDays, Lookback: time.Duration(*lookback) * time.Hour * 24, SecretsConfigPath: secretsConfigPath, - CacheDir: cacheDir, + CacheDir: *cacheDir, Secrets: secrets, OAuth2Browser: *browser, } -- cgit v1.2.3