diff options
author | Tulir Asokan <tulir@maunium.net> | 2019-04-13 00:51:58 +0300 |
---|---|---|
committer | Tulir Asokan <tulir@maunium.net> | 2019-04-13 00:51:58 +0300 |
commit | 43a7bdab7262c015b50e3e673e80389f9514f9ca (patch) | |
tree | 0efd957e49ebe6c6350a3b9067e3068b24b2448c /ui/messages/html/container.go | |
parent | abd21affc42ad65968c946c3bbd6c63eba342981 (diff) |
Add better stringification for UI message types for debugging
Diffstat (limited to 'ui/messages/html/container.go')
-rw-r--r-- | ui/messages/html/container.go | 5 |
1 files changed, 3 insertions, 2 deletions
diff --git a/ui/messages/html/container.go b/ui/messages/html/container.go index b17bc1f..c1cf865 100644 --- a/ui/messages/html/container.go +++ b/ui/messages/html/container.go @@ -84,12 +84,13 @@ func (ce *ContainerEntity) String() string { return fmt.Sprintf(`&html.ContainerEntity{Base=%s, Indent=%d, Children=[]}`, ce.BaseEntity, ce.Indent) } var buf strings.Builder - _, _ = fmt.Fprintf(&buf, `&html.ContainerEntity{Base=%s, Indent=%d, Children=[`, ce.BaseEntity, ce.Indent) + _, _ = fmt.Fprintf(&buf, `&html.ContainerEntity{Base=%s, + Indent=%d, Children=[`, ce.BaseEntity, ce.Indent) for _, child := range ce.Children { buf.WriteString("\n ") buf.WriteString(strings.Join(strings.Split(strings.TrimRight(child.String(), "\n"), "\n"), "\n ")) } - buf.WriteString("\n]}\n,") + buf.WriteString("\n]},") return buf.String() } |