mirror of
https://github.com/optim-enterprises-bv/vault.git
synced 2025-10-30 02:02:43 +00:00
command/read: output the duration
This commit is contained in:
@@ -83,8 +83,10 @@ func (c *ReadCommand) formatTable(s *api.Secret, whitespace bool) int {
|
|||||||
input := make([]string, 0, 5)
|
input := make([]string, 0, 5)
|
||||||
input = append(input, fmt.Sprintf("Key %s Value", config.Delim))
|
input = append(input, fmt.Sprintf("Key %s Value", config.Delim))
|
||||||
|
|
||||||
if s.LeaseID != "" {
|
if s.LeaseID != "" && s.LeaseDuration > 0 {
|
||||||
input = append(input, fmt.Sprintf("lease_id %s %s", config.Delim, s.LeaseID))
|
input = append(input, fmt.Sprintf("lease_id %s %s", config.Delim, s.LeaseID))
|
||||||
|
input = append(input, fmt.Sprintf(
|
||||||
|
"lease_duration %s %d", config.Delim, s.LeaseDuration))
|
||||||
}
|
}
|
||||||
|
|
||||||
for k, v := range s.Data {
|
for k, v := range s.Data {
|
||||||
|
|||||||
Reference in New Issue
Block a user