Browse Source

Use fs args in CLI

Signed-off-by: jolheiser <john.olheiser@gmail.com>
main
jolheiser 2 weeks ago
parent
commit
5871595462
Signed by: jolheiser GPG Key ID: B853ADA5DA7BBF7A
  1. 4
      cmd/spectre/main.go

4
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),

Loading…
Cancel
Save