add readme

This commit is contained in:
2026-03-30 21:51:48 +01:00
parent a98ef28055
commit 31d0e05dfd
4 changed files with 24 additions and 8 deletions
+2 -2
View File
@@ -2,6 +2,6 @@ package internal
type CLI struct {
File string `arg:"" name:"file" short:"f" help:"Path to CSV redirects file." type:"path"`
Host string `name:"host" help:"HTTP listen host." default:"${host}"`
Port string `name:"port" short:"p" help:"HTTP listen port." default:"${port}"`
Host string `name:"host" help:"HTTP listen host." default:"localhost"`
Port string `name:"port" short:"p" help:"HTTP listen port." default:"4000"`
}
+2
View File
@@ -41,7 +41,9 @@ func ReadCsvRedirects(file string) (Redirects, error) {
return nil, errors.New("CSV must contain From, To, and Status Code headings")
}
// Read data
redirects := Redirects{}
for {
row, err := csvReader.Read()
if err != nil {