From 5871595462f30415dc6486c72ce7c3786e62ce38 Mon Sep 17 00:00:00 2001 From: jolheiser Date: Tue, 23 Nov 2021 21:47:01 -0600 Subject: [PATCH] Use fs args in CLI Signed-off-by: jolheiser --- cmd/spectre/main.go | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/cmd/spectre/main.go b/cmd/spectre/main.go index 9248bc2..da941f8 100644 --- a/cmd/spectre/main.go +++ b/cmd/spectre/main.go @@ -41,7 +41,7 @@ func main() { templateFlag = scopeFlag.DefaultTemplate() } - if *usernameFlag == "" || *secretFlag == "" || len(os.Args) < 2 { + if *usernameFlag == "" || *secretFlag == "" || fs.NArg() < 1 { panic("username, secret, and site are required") } @@ -52,7 +52,7 @@ func main() { panic(err) } - pw := s.Site(os.Args[1], + pw := s.Site(fs.Arg(0), spectre.WithScope(scopeFlag), spectre.WithTemplate(templateFlag), spectre.WithCounter(*counterFlag),