aboutsummaryrefslogtreecommitdiffstats
path: root/commands/user.go
diff options
context:
space:
mode:
authorMichael Muré <batolettre@gmail.com>2020-11-08 19:18:44 +0100
committerMichael Muré <batolettre@gmail.com>2021-02-14 12:17:47 +0100
commitab57d74a312f325b9d889752aa92c00c395de20f (patch)
treeb54b204f7f7ccb64181051b58cc01ddeed42e1be /commands/user.go
parent7163b2283b4542a4d4abfe9a71963f122322bde7 (diff)
downloadgit-bug-ab57d74a312f325b9d889752aa92c00c395de20f.tar.gz
deal with the previous changes
Diffstat (limited to 'commands/user.go')
-rw-r--r--commands/user.go14
1 files changed, 9 insertions, 5 deletions
diff --git a/commands/user.go b/commands/user.go
index d4d3fecd..29c4e932 100644
--- a/commands/user.go
+++ b/commands/user.go
@@ -35,7 +35,7 @@ func newUserCommand() *cobra.Command {
flags.SortFlags = false
flags.StringVarP(&options.fields, "field", "f", "",
- "Select field to display. Valid values are [email,humanId,id,lastModification,lastModificationLamport,login,metadata,name]")
+ "Select field to display. Valid values are [email,humanId,id,lastModification,lastModificationLamports,login,metadata,name]")
return cmd
}
@@ -71,7 +71,9 @@ func runUser(env *Env, opts userOptions, args []string) error {
env.out.Printf("%s\n", id.LastModification().
Time().Format("Mon Jan 2 15:04:05 2006 +0200"))
case "lastModificationLamport":
- env.out.Printf("%d\n", id.LastModificationLamport())
+ for name, t := range id.LastModificationLamports() {
+ env.out.Printf("%s\n%d\n", name, t)
+ }
case "metadata":
for key, value := range id.ImmutableMetadata() {
env.out.Printf("%s\n%s\n", key, value)
@@ -90,9 +92,11 @@ func runUser(env *Env, opts userOptions, args []string) error {
env.out.Printf("Name: %s\n", id.Name())
env.out.Printf("Email: %s\n", id.Email())
env.out.Printf("Login: %s\n", id.Login())
- env.out.Printf("Last modification: %s (lamport %d)\n",
- id.LastModification().Time().Format("Mon Jan 2 15:04:05 2006 +0200"),
- id.LastModificationLamport())
+ env.out.Printf("Last modification: %s\n", id.LastModification().Time().Format("Mon Jan 2 15:04:05 2006 +0200"))
+ env.out.Printf("Last moditication (lamport):\n")
+ for name, t := range id.LastModificationLamports() {
+ env.out.Printf("\t%s: %d", name, t)
+ }
env.out.Println("Metadata:")
for key, value := range id.ImmutableMetadata() {
env.out.Printf(" %s --> %s\n", key, value)