We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 14de33c commit 173111fCopy full SHA for 173111f
serialization/serialization.go
@@ -21,12 +21,10 @@ type Message struct {
21
fieldIndex map[string]uint8
22
}
23
24
-func (m *Message) String() (text string) {
25
- text += fmt.Sprintf("Message (version: %d)", m.Version)
26
- for _, line := range m.Format.stringParts() {
27
- text += "\n " + line
28
- }
29
- return
+func (m *Message) String() string {
+ parts := []string{fmt.Sprintf("Message (version: %d)", m.Version)}
+ parts = append(parts, m.Format.stringParts()...)
+ return strings.Join(parts, "\n ")
30
31
32
// GetFieldByName returns a field if the name matches and an error if there is no match
0 commit comments