1diff --git a/.gitignore b/.gitignore
2index f331ccd56052fda427b7b1b8b581d13c01147937..7712b56b5dc3ab2a10a6ab6f40ebb695ce7261d0 100644
3--- a/.gitignore
4+++ b/.gitignore
5@@ -1,2 +1,4 @@
6 bin/
7 vendor/
8+
9+index.md
10diff --git a/Makefile b/Makefile
11index e5bf8e969c0ba1a495a15f815588997245e31e15..6fafba4ebc4d223483e478afff481cb62aa430e5 100644
12--- a/Makefile
13+++ b/Makefile
14@@ -20,3 +20,10 @@ install -Dm755 $(OUT) $(BINDIR)/$(BIN)
15
16 compress:
17 upx --best --ultra-brute $(OUT)
18+
19+check: build
20+ $(OUT) \
21+ -f example.md \
22+ -t text \
23+ -u https://alpine.mirror.wearetriple.com/v3.18/main/x86_64/APKINDEX.tar.gz \
24+ -o index.txt
25diff --git a/main.go b/main.go
26index 3f3f40cb1179c88d3381c9dfc48a7d929653e8ee..2231f97c2a1f8599a0fccba5350a0b8c76bf2a8a 100644
27--- a/main.go
28+++ b/main.go
29@@ -18,8 +18,8 @@ func main() {
30 var (
31 url = flag.StringP("url", "u", "", "Url to the APKINDEX.tar.gz")
32 output = flag.StringP("output", "o", "index.md", "Output path")
33- templateType = flag.StringP("template-type", "p", "text", "Template system to be used, options: html, text")
34- templateFile = flag.StringP("template-file", "t", "text", "Template file to be used")
35+ templateType = flag.StringP("template-type", "t", "text", "Template system to be used, options: html, text")
36+ templateFile = flag.StringP("template-file", "f", "text", "Template file to be used")
37 )
38 flag.Parse()
39
40@@ -40,7 +40,6 @@ url string,
41 output string,
42 templateType string,
43 templateFile string,
44-
45 ) error {
46
47 tarStream, err := fechIndex(url)
48@@ -68,10 +67,11 @@ break
49 }
50 }
51
52- s := bufio.NewScanner(tr)
53-
54- entries := make([]*Entry, 0)
55- lines := make([]string, 0)
56+ var (
57+ s = bufio.NewScanner(tr)
58+ entries = make([]*Entry, 0)
59+ lines = make([]string, 0)
60+ )
61
62 for s.Scan() {
63 l := s.Text()