command/read: output the duration

This commit is contained in:
Mitchell Hashimoto
2015-04-13 17:41:35 -07:00
parent 96f7d05e4b
commit c359ba05f0

View File

@@ -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 {