comicNo:=flag.Int("n",int(client.LatestComic),"Comic number to fetch (default latest)",)clientTimeout:=flag.Int64("t",int64(client.DefaultClientTimeout.Seconds()),"Client timeout in seconds",)saveImage:=flag.Bool("s",false,"Save image to current directory",)outputType:=flag.String("o","text","Print output in format: text/json",)
The CLI interface tends to get more and more complicated as we put more functionalities into it, normally. To avoid hand-crafting the above code manually, there is a ready made tool to make things a bit easier from a .yaml definition file -- github.com/go-easygen/wireframe#co...
check it out, give it a try...
For further actions, you may consider blocking this person and/or reporting abuse
We're a place where coders share, stay up-to-date and grow their careers.
The CLI interface tends to get more and more complicated as we put more functionalities into it, normally. To avoid hand-crafting the above code manually, there is a ready made tool to make things a bit easier from a
.yaml
definition file --github.com/go-easygen/wireframe#co...
check it out, give it a try...