diff options
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 14 |
1 files changed, 7 insertions, 7 deletions
@@ -18,8 +18,8 @@ func main() { var ( url = flag.StringP("url", "u", "", "Url to the APKINDEX.tar.gz") output = flag.StringP("output", "o", "index.md", "Output path") - templateType = flag.StringP("template-type", "p", "text", "Template system to be used, options: html, text") - templateFile = flag.StringP("template-file", "t", "text", "Template file to be used") + templateType = flag.StringP("template-type", "t", "text", "Template system to be used, options: html, text") + templateFile = flag.StringP("template-file", "f", "text", "Template file to be used") ) flag.Parse() @@ -40,7 +40,6 @@ func run( output string, templateType string, templateFile string, - ) error { tarStream, err := fechIndex(url) @@ -68,10 +67,11 @@ func run( } } - s := bufio.NewScanner(tr) - - entries := make([]*Entry, 0) - lines := make([]string, 0) + var ( + s = bufio.NewScanner(tr) + entries = make([]*Entry, 0) + lines = make([]string, 0) + ) for s.Scan() { l := s.Text() |