Skip to content

Commit

Permalink
fix: properly compose pattern and header in etcd members output
Browse files Browse the repository at this point in the history
Header was printed more than once.

Signed-off-by: Artem Chernyshev <artem.0xD2@gmail.com>
  • Loading branch information
Unix4ever authored and talos-bot committed May 14, 2021
1 parent 0825cf1 commit a26174b
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions cmd/talosctl/cmd/talos/etcd.go
Original file line number Diff line number Diff line change
Expand Up @@ -100,8 +100,8 @@ var etcdMemberListCmd = &cobra.Command{
continue
}

for _, member := range message.Members {
if i == 0 {
for j, member := range message.Members {
if i == 0 && j == 0 {
if node != "" {
fmt.Fprintln(w, "NODE\tID\tHOSTNAME\tPEER URLS\tCLIENT URLS")
pattern = "%s\t" + pattern
Expand Down

0 comments on commit a26174b

Please sign in to comment.