chat: Fix runtime bug with uninitialized strings builder

This commit is contained in:
Andrey Petrov 2019-03-18 10:08:12 -04:00
parent b8fb704c8f
commit 2089eda486
1 changed files with 3 additions and 3 deletions

View File

@ -210,9 +210,9 @@ func InitCommands(c *Commands) {
if cfg.Theme != nil {
theme = cfg.Theme.ID()
}
var output *strings.Builder
fmt.Fprintf(output, "Current theme: %s%s", theme, message.Newline)
fmt.Fprintf(output, " Themes available: ")
var output strings.Builder
fmt.Fprintf(&output, "Current theme: %s%s", theme, message.Newline)
fmt.Fprintf(&output, " Themes available: ")
for i, t := range message.Themes {
output.WriteString(t.ID())