Check config file syntax

This commit is contained in:
Iwasaki Yudai 2015-09-01 20:28:45 -07:00
parent 62f5d4aaf3
commit 83923b6f39
8 changed files with 23 additions and 240 deletions

View file

@ -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...),