From cfd01ade02924d0e81004f744adc3f18ac77d5a7 Mon Sep 17 00:00:00 2001 From: Gabriel Arakaki Giovanini Date: Sun, 17 Sep 2023 19:14:19 +0200 Subject: feat: Add check rule --- main.go | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) (limited to 'main.go') diff --git a/main.go b/main.go index 3f3f40c..2231f97 100644 --- a/main.go +++ b/main.go @@ -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() -- cgit v1.2.3