diff options
| author | demo <demo@antix1> | 2026-06-11 23:09:52 -0400 |
|---|---|---|
| committer | demo <demo@antix1> | 2026-06-11 23:09:52 -0400 |
| commit | 99bdb743b10cfbe746e845967ebbd4de06a9c49a (patch) | |
| tree | 1677ac7b75eafa3ff343533ea0c1bc32e2b6f78c | |
| parent | 3a8154d11816476fec3e74bb69f965d45f380d9c (diff) | |
feat: set shortcode filename inside a constant
| -rw-r--r-- | main.go | 5 |
1 files changed, 3 insertions, 2 deletions
@@ -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 } |
