~rafael/gembro

b883325f8c06bfc7d11c101b76d98e255301da80 — RafaĆ«l L. Bekkema 3 years ago c57b116
Allow passing url as plain argument
1 files changed, 6 insertions(+), 3 deletions(-)

M main.go
M main.go => main.go +6 -3
@@ 51,11 51,14 @@ func main() {
	cacheDir := flag.String("cache-dir", "", "Directory to store cache files (like cert info and bookmarks)")
	debug := flag.String("debug-url", "", "Debug an URL")
	logFile := flag.String("log-file", "", "File to output log to")
	url := flag.String("url", "", "Load this URL")

	gen := flag.String("generate-certificate", "", "Generate a client certificate with given name")
	flag.Parse()

	var url string
	if len(flag.Args()) > 0 {
		url = flag.Arg(0)
	}

	log.SetFlags(log.LstdFlags | log.Lshortfile)

	if *debug != "" {


@@ 104,7 107,7 @@ func main() {
		return
	}

	if err := run(*cacheDir, *url); err != nil {
	if err := run(*cacheDir, url); err != nil {
		fmt.Println(err)
		os.Exit(1)
	}