Use fs args in CLI
continuous-integration/woodpecker the build was successful Details

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2021-11-23 21:47:01 -06:00
parent 7e73fb5238
commit 5871595462
Signed by: jolheiser
GPG Key ID: B853ADA5DA7BBF7A
1 changed files with 2 additions and 2 deletions

View File

@ -41,7 +41,7 @@ func main() {
templateFlag = scopeFlag.DefaultTemplate() templateFlag = scopeFlag.DefaultTemplate()
} }
if *usernameFlag == "" || *secretFlag == "" || len(os.Args) < 2 { if *usernameFlag == "" || *secretFlag == "" || fs.NArg() < 1 {
panic("username, secret, and site are required") panic("username, secret, and site are required")
} }
@ -52,7 +52,7 @@ func main() {
panic(err) panic(err)
} }
pw := s.Site(os.Args[1], pw := s.Site(fs.Arg(0),
spectre.WithScope(scopeFlag), spectre.WithScope(scopeFlag),
spectre.WithTemplate(templateFlag), spectre.WithTemplate(templateFlag),
spectre.WithCounter(*counterFlag), spectre.WithCounter(*counterFlag),