Skip to content

Commit

Permalink
get the raft_term included in double quote when displaying in hex
Browse files Browse the repository at this point in the history
  • Loading branch information
ahrtr committed Feb 17, 2022
1 parent e814f6f commit 17f8b68
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG/CHANGELOG-3.6.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,6 +16,7 @@ See [code changes](https://github.com/etcd-io/etcd/compare/v3.5.0...v3.6.0).

- Add command to generate [shell completion](https://github.com/etcd-io/etcd/pull/13133).
- When print endpoint status, [show db size in use](https://github.com/etcd-io/etcd/pull/13639)
- Get raft_term included in double quotes when displaying member list in hex and json, see [code change](https://github.com/etcd-io/etcd/pull/13711).

### etcdutl v3

Expand Down
4 changes: 2 additions & 2 deletions etcdctl/ctlv3/command/printer_json.go
Original file line number Diff line number Diff line change
Expand Up @@ -66,10 +66,10 @@ func printMemberListWithHexJSON(r clientv3.MemberListResponse) {
buffer.WriteString("\",\"member_id\":\"")
b = strconv.AppendUint(nil, r.Header.MemberId, 16)
buffer.Write(b)
buffer.WriteString("\",\"raft_term\":")
buffer.WriteString("\",\"raft_term\":\"")
b = strconv.AppendUint(nil, r.Header.RaftTerm, 16)
buffer.Write(b)
buffer.WriteByte('}')
buffer.WriteString("\"}")
for i := 0; i < len(r.Members); i++ {
if i == 0 {
buffer.WriteString(",\"members\":[{\"ID\":\"")
Expand Down

0 comments on commit 17f8b68

Please sign in to comment.