diff --git a/etcdutl/etcdutl/printer.go b/etcdutl/etcdutl/printer.go index a74f29a1ac4c..4895d45d2129 100644 --- a/etcdutl/etcdutl/printer.go +++ b/etcdutl/etcdutl/printer.go @@ -82,7 +82,7 @@ func makeDBStatusTable(ds snapshot.Status) (hdr []string, rows [][]string) { func makeDBHashKVTable(ds snapshot.HashKV) (hdr []string, rows [][]string) { hdr = []string{"hash", "hash revision", "compact revision"} rows = append(rows, []string{ - fmt.Sprintf("%x", ds.Hash), + fmt.Sprint(ds.Hash), fmt.Sprint(ds.HashRevision), fmt.Sprint(ds.CompactRevision), }) diff --git a/etcdutl/etcdutl/snapshot_command.go b/etcdutl/etcdutl/snapshot_command.go index 03f760a0e1b3..c88d57ae10f0 100644 --- a/etcdutl/etcdutl/snapshot_command.go +++ b/etcdutl/etcdutl/snapshot_command.go @@ -72,12 +72,10 @@ func newSnapshotHashKVCommand() *cobra.Command { cmd := &cobra.Command{ Use: "hashkv ", Short: "Prints the KV history hash of a given file", - Long: `When --write-out is set to simple, this command prints out comma-separated status lists for each endpoint. -The items in the lists are hash, hash revision, compact revision. `, - Run: SnapshotHashKVCommandFunc, + Run: snapshotHashKVCommandFunc, } - cmd.Flags().Int64Var(&hashKVRevision, "rev", 0, "maximum revision to hash (default: all revisions)") + cmd.Flags().Int64Var(&hashKVRevision, "rev", 0, "maximum revision to hash (default: latest revision)") return cmd }