MCPcopy Create free account
hub / github.com/hashicorp/vault / simpleMounts

Method simpleMounts

command/secrets_list.go:117–131  ·  view source on GitHub ↗
(mounts map[string]*api.MountOutput)

Source from the content-addressed store, hash-verified

115}
116
117func (c *SecretsListCommand) simpleMounts(mounts map[string]*api.MountOutput) []string {
118 paths := make([]string, 0, len(mounts))
119 for path := range mounts {
120 paths = append(paths, path)
121 }
122 sort.Strings(paths)
123
124 out := []string{"Path | Type | Accessor | Description"}
125 for _, path := range paths {
126 mount := mounts[path]
127 out = append(out, fmt.Sprintf("%s | %s | %s | %s", path, mount.Type, mount.Accessor, mount.Description))
128 }
129
130 return out
131}
132
133func (c *SecretsListCommand) detailedMounts(mounts map[string]*api.MountOutput) []string {
134 paths := make([]string, 0, len(mounts))

Callers 1

RunMethod · 0.95

Calls 1

StringsMethod · 0.65

Tested by

no test coverage detected