Skip to content

Commit

Permalink
Apply suggestions from code review
Browse files Browse the repository at this point in the history
Co-authored-by: Benjamin Wang <[email protected]>
  • Loading branch information
cenkalti and ahrtr authored Mar 30, 2024
1 parent 2d43554 commit cdd9854
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 5 deletions.
2 changes: 1 addition & 1 deletion etcdutl/etcdutl/printer.go
Original file line number Diff line number Diff line change
Expand Up @@ -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),
})
Expand Down
6 changes: 2 additions & 4 deletions etcdutl/etcdutl/snapshot_command.go
Original file line number Diff line number Diff line change
Expand Up @@ -72,12 +72,10 @@ func newSnapshotHashKVCommand() *cobra.Command {
cmd := &cobra.Command{

Check failure on line 72 in etcdutl/etcdutl/snapshot_command.go

View workflow job for this annotation

GitHub Actions / test

cmd declared and not used
Use: "hashkv <filename>",
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.
`,

Check failure on line 75 in etcdutl/etcdutl/snapshot_command.go

View workflow job for this annotation

GitHub Actions / run

string not terminated

Check failure on line 75 in etcdutl/etcdutl/snapshot_command.go

View workflow job for this annotation

GitHub Actions / test

raw string literal not terminated

Check failure on line 75 in etcdutl/etcdutl/snapshot_command.go

View workflow job for this annotation

GitHub Actions / test

mixture of field:value and value elements in struct literal
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
}

Expand Down

0 comments on commit cdd9854

Please sign in to comment.