diff options
author | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-03 14:34:32 +0200 |
---|---|---|
committer | Gabriel Arakaki Giovanini <mail@gabrielgio.me> | 2023-09-03 14:34:32 +0200 |
commit | 41f860a791c9869ce68d55aeb97cc07d7f47c09c (patch) | |
tree | 3b046b39479b2a523cae4d52abeb407524acf0be /main.go | |
parent | 2b060e55e538a70f0edcd25d9a4c491a03d50149 (diff) | |
download | apkdoc-41f860a791c9869ce68d55aeb97cc07d7f47c09c.tar.gz apkdoc-41f860a791c9869ce68d55aeb97cc07d7f47c09c.tar.bz2 apkdoc-41f860a791c9869ce68d55aeb97cc07d7f47c09c.zip |
ref: Move to pflag
Don't like default single `-` param.
Diffstat (limited to 'main.go')
-rw-r--r-- | main.go | 8 |
1 files changed, 4 insertions, 4 deletions
@@ -5,13 +5,13 @@ import ( "bufio" "compress/gzip" "errors" - "flag" "io" "net/http" "os" "git.sr.ht/~gabrielgio/apkdoc/parser" "git.sr.ht/~gabrielgio/apkdoc/templates" + flag "github.com/spf13/pflag" ) func fechIndex(url string) (io.ReadCloser, error) { @@ -28,9 +28,9 @@ func fechIndex(url string) (io.ReadCloser, error) { } func main() { - url := flag.String("url", "", "Url to the APKINDEX.tar.gz") - output := flag.String("output", "index.md", "Output path") - repositoryFormat := flag.String("repository-format", "https://git.sr.ht/~gabrielgio/apkbuilds/tree/%s/item/apks/%s", "Template to build repository link") + url := flag.StringP("url", "u", "", "Url to the APKINDEX.tar.gz") + output := flag.StringP("output", "o", "index.md", "Output path") + repositoryFormat := flag.StringP("repository-format", "f", "https://git.sr.ht/~gabrielgio/apkbuilds/tree/%s/item/apks/%s", "Template to build repository link") flag.Parse() tarStream, err := fechIndex(*url) |