mirror of
https://github.com/gopasspw/gopass.git
synced 2026-10-17 01:49:38 +02:00
This change adds GoDoc comments to many of the public symbols in the `pkg/` directory. It also includes various improvements to the documentation in `README.md` and other markdown files in the `docs/` directory. This is a partial documentation effort, as requested by the user, to get a pull request submitted quickly. Co-authored-by: google-labs-jules[bot] <161369871+google-labs-jules[bot]@users.noreply.github.com>
28 lines
619 B
Go
28 lines
619 B
Go
package action
|
|
|
|
import (
|
|
"sort"
|
|
"strings"
|
|
|
|
"github.com/gopasspw/gopass/internal/out"
|
|
"github.com/gopasspw/gopass/pkg/pwgen/pwrules"
|
|
"github.com/urfave/cli/v2"
|
|
)
|
|
|
|
// AliasesPrint prints all configured aliases for password generation rules.
|
|
func (s *Action) AliasesPrint(c *cli.Context) error {
|
|
out.Printf(c.Context, "Configured aliases:")
|
|
aliases := pwrules.AllAliases(c.Context)
|
|
keys := make([]string, 0, len(aliases))
|
|
for k := range aliases {
|
|
keys = append(keys, k)
|
|
}
|
|
|
|
sort.Strings(keys)
|
|
for _, k := range keys {
|
|
out.Printf(c.Context, "- %s -> %s", k, strings.Join(aliases[k], ", "))
|
|
}
|
|
|
|
return nil
|
|
}
|