From 8d8fa84f4f336f7a2e43acf7ca0c417299df8f8b Mon Sep 17 00:00:00 2001 From: Teddy Wing Date: Tue, 14 Nov 2023 01:30:23 +0100 Subject: main: Add basic command line argument parsing Found Claw from a search for "argument parser" on https://godocs.io. I did a quick comparison with a few other argument parsing libraries I found in a GitHub search: * https://github.com/alexflint/go-arg * https://github.com/docopt/docopt.go * https://github.com/fred1268/go-clap Claw ended up being the most straightforward to me. --- go.mod | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) (limited to 'go.mod') diff --git a/go.mod b/go.mod index f3b023c..b17d5be 100644 --- a/go.mod +++ b/go.mod @@ -2,10 +2,13 @@ module gopkg.teddywing.com/swextreload go 1.21.4 -require github.com/chromedp/chromedp v0.9.3 +require ( + git.sr.ht/~liliace/claw v0.1.1 + github.com/chromedp/cdproto v0.0.0-20231011050154-1d073bb38998 + github.com/chromedp/chromedp v0.9.3 +) require ( - github.com/chromedp/cdproto v0.0.0-20231011050154-1d073bb38998 // indirect github.com/chromedp/sysutil v1.0.0 // indirect github.com/gobwas/httphead v0.1.0 // indirect github.com/gobwas/pool v0.2.1 // indirect -- cgit v1.2.3