add readme
This commit is contained in:
+2
-2
@@ -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"`
|
||||
}
|
||||
|
||||
@@ -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 {
|
||||
|
||||
Reference in New Issue
Block a user