From c359ba05f05db6b8cc174d0a3c0712893cbfbfcb Mon Sep 17 00:00:00 2001 From: Mitchell Hashimoto Date: Mon, 13 Apr 2015 17:41:35 -0700 Subject: [PATCH] command/read: output the duration --- command/read.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/command/read.go b/command/read.go index 0ead0c2b98..cd5d182a27 100644 --- a/command/read.go +++ b/command/read.go @@ -83,8 +83,10 @@ func (c *ReadCommand) formatTable(s *api.Secret, whitespace bool) int { input := make([]string, 0, 5) 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_duration %s %d", config.Delim, s.LeaseDuration)) } for k, v := range s.Data {