From 99bdb743b10cfbe746e845967ebbd4de06a9c49a Mon Sep 17 00:00:00 2001 From: demo Date: Thu, 11 Jun 2026 23:09:52 -0400 Subject: feat: set shortcode filename inside a constant --- main.go | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/main.go b/main.go index 2b072b3..db8cd3d 100644 --- a/main.go +++ b/main.go @@ -16,6 +16,8 @@ import ( "github.com/urfave/cli/v3" ) +const shortcodeFilename = "urls.csv" + func main() { if os.Getenv("GOEXPERIMENT") != "goroutineleakprofile" { log.Fatal("Missing GOEXPERIMENT=goroutineleakprofile environment setting") @@ -74,8 +76,7 @@ func main() { }, Action: func(ctx context.Context, cmd *cli.Command) error { if shortcode := cmd.String("shortcode"); shortcode != "" { - // FIXME: shortcode filename is hardcoded for now. - rawURL, err := getURLFromShortcode("urls.csv", shortcode) + rawURL, err := getURLFromShortcode(shortcodeFilename, shortcode) if err != nil { return err } -- cgit v1.2.3