diff options
author | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:01:14 +0200 |
---|---|---|
committer | Michael Muré <batolettre@gmail.com> | 2021-04-09 13:01:14 +0200 |
commit | 1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7 (patch) | |
tree | f6d71c1f29cf06ccab9e4ae434b19ab17caa4385 /commands/user.go | |
parent | 0fd570171d171aa574d7f01d6033a9c01d668465 (diff) | |
parent | bc5f618eba812859bf87ce2c31b278bd518d4555 (diff) | |
download | git-bug-1520f678f7a2bc6e01d9b01df5ce49f2f46be7d7.tar.gz |
Merge remote-tracking branch 'origin/master' into dev-gh-bridge
Diffstat (limited to 'commands/user.go')
-rw-r--r-- | commands/user.go | 14 |
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) |