mirror of
https://github.com/yudai/gotty.git
synced 2025-12-30 22:28:50 +01:00
Check config file syntax
This commit is contained in:
parent
62f5d4aaf3
commit
83923b6f39
8 changed files with 23 additions and 240 deletions
|
|
@ -128,7 +128,11 @@ func (context *clientContext) sendInitialize() error {
|
|||
}
|
||||
writer.Close()
|
||||
|
||||
prefs, _ := json.Marshal(context.app.options.Preferences)
|
||||
htermPrefs := make(map[string]interface{})
|
||||
for key, value := range context.app.options.Preferences {
|
||||
htermPrefs[strings.Replace(key, "_", "-", -1)] = value
|
||||
}
|
||||
prefs, _ := json.Marshal(htermPrefs)
|
||||
context.connection.WriteMessage(
|
||||
websocket.TextMessage,
|
||||
append([]byte{SetPreferences}, prefs...),
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue