forked from toolshed/abra
refactor: abstract secret generation into package
This commit is contained in:
13
cli/app.go
13
cli/app.go
@ -297,20 +297,11 @@ var appSecretCommand = &cli.Command{
|
||||
Name: "secret",
|
||||
Flags: []cli.Flag{AllFlag, PassFlag},
|
||||
Action: func(c *cli.Context) error {
|
||||
passwords, err := passgen.GeneratePassphrases(
|
||||
1,
|
||||
passgen.PassphraseWordCountDefault,
|
||||
rune('-'),
|
||||
passgen.PassphraseCasingDefault,
|
||||
passgen.WordListDefault,
|
||||
)
|
||||
password, err := secret.GeneratePassphrases(1)
|
||||
if err != nil {
|
||||
logrus.Fatal(err)
|
||||
}
|
||||
|
||||
for _, password := range passwords {
|
||||
fmt.Println(password)
|
||||
}
|
||||
fmt.Println(password)
|
||||
return nil
|
||||
},
|
||||
}
|
||||
|
Reference in New Issue
Block a user