mirror of
https://github.com/shazow/ssh-chat.git
synced 2025-04-13 15:47:17 +03:00
chat: Fix runtime bug with uninitialized strings builder
This commit is contained in:
parent
b8fb704c8f
commit
2089eda486
@ -210,9 +210,9 @@ func InitCommands(c *Commands) {
|
|||||||
if cfg.Theme != nil {
|
if cfg.Theme != nil {
|
||||||
theme = cfg.Theme.ID()
|
theme = cfg.Theme.ID()
|
||||||
}
|
}
|
||||||
var output *strings.Builder
|
var output strings.Builder
|
||||||
fmt.Fprintf(output, "Current theme: %s%s", theme, message.Newline)
|
fmt.Fprintf(&output, "Current theme: %s%s", theme, message.Newline)
|
||||||
fmt.Fprintf(output, " Themes available: ")
|
fmt.Fprintf(&output, " Themes available: ")
|
||||||
|
|
||||||
for i, t := range message.Themes {
|
for i, t := range message.Themes {
|
||||||
output.WriteString(t.ID())
|
output.WriteString(t.ID())
|
||||||
|
Loading…
x
Reference in New Issue
Block a user