Skip to content

Commit

Permalink
all: Changing Printf and friends to Print if there is no formatting
Browse files Browse the repository at this point in the history
Signed-off-by: Sasha Melentyev <[email protected]>
  • Loading branch information
sashamelentyev committed Nov 15, 2022
1 parent cdd4cb3 commit d70f523
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 4 deletions.
2 changes: 1 addition & 1 deletion tracker/progress.go
Original file line number Diff line number Diff line change
Expand Up @@ -246,7 +246,7 @@ func (pr *Progress) String() string {
fmt.Fprintf(&buf, " pendingSnap=%d", pr.PendingSnapshot)
}
if !pr.RecentActive {
fmt.Fprintf(&buf, " inactive")
fmt.Fprint(&buf, " inactive")
}
if n := pr.Inflights.Count(); n > 0 {
fmt.Fprintf(&buf, " inflight=%d", n)
Expand Down
2 changes: 1 addition & 1 deletion tracker/tracker.go
Original file line number Diff line number Diff line change
Expand Up @@ -87,7 +87,7 @@ func (c Config) String() string {
fmt.Fprintf(&buf, " learners_next=%s", quorum.MajorityConfig(c.LearnersNext).String())
}
if c.AutoLeave {
fmt.Fprintf(&buf, " autoleave")
fmt.Fprint(&buf, " autoleave")
}
return buf.String()
}
Expand Down
4 changes: 2 additions & 2 deletions util.go
Original file line number Diff line number Diff line change
Expand Up @@ -161,14 +161,14 @@ func DescribeMessage(m pb.Message, f EntryFormatter) string {
fmt.Fprintf(&buf, " Commit:%d", m.Commit)
}
if len(m.Entries) > 0 {
fmt.Fprintf(&buf, " Entries:[")
fmt.Fprint(&buf, " Entries:[")
for i, e := range m.Entries {
if i != 0 {
buf.WriteString(", ")
}
buf.WriteString(DescribeEntry(e, f))
}
fmt.Fprintf(&buf, "]")
fmt.Fprint(&buf, "]")
}
if s := m.Snapshot; s != nil && !IsEmptySnap(*s) {
fmt.Fprintf(&buf, " Snapshot: %s", DescribeSnapshot(*s))
Expand Down

0 comments on commit d70f523

Please sign in to comment.