From f6eb83815983b27524d1f762436f7f4bf9a41e59 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Michael=20Mur=C3=A9?= Date: Tue, 26 Feb 2019 22:27:30 +0100 Subject: [PATCH] commands: "user ls" also show metadata --- commands/user.go | 4 ++++ commands/{user_list.go => user_ls.go} | 0 2 files changed, 4 insertions(+) rename commands/{user_list.go => user_ls.go} (100%) diff --git a/commands/user.go b/commands/user.go index c4208d418eb9a07c4010489e9fb214731ceba753..1218032110b499ca8d8afdbc8ecc80d62c371991 100644 --- a/commands/user.go +++ b/commands/user.go @@ -39,6 +39,10 @@ func runUser(cmd *cobra.Command, args []string) error { fmt.Printf("Last modification: %s (lamport %d)\n", id.LastModification().Time().Format("Mon Jan 2 15:04:05 2006 +0200"), id.LastModificationLamport()) + fmt.Println("Metadata:") + for key, value := range id.ImmutableMetadata() { + fmt.Printf(" %s --> %s\n", key, value) + } // fmt.Printf("Protected: %v\n", id.IsProtected()) return nil diff --git a/commands/user_list.go b/commands/user_ls.go similarity index 100% rename from commands/user_list.go rename to commands/user_ls.go