From e798684b3e2eb3eb9ded4b40d6244bb93fea4d2e Mon Sep 17 00:00:00 2001 From: joeyak Date: Sun, 31 Mar 2019 15:59:57 -0400 Subject: [PATCH] Change the show debug names --- wasm/main.go | 19 ++++++++++++------- 1 file changed, 12 insertions(+), 7 deletions(-) diff --git a/wasm/main.go b/wasm/main.go index 77231ac..34d45a9 100644 --- a/wasm/main.go +++ b/wasm/main.go @@ -171,13 +171,18 @@ func isValidName(this js.Value, v []js.Value) interface{} { } func debugValues(v []js.Value) { - fmt.Printf("timestamp: %#v\n", timestamp) - fmt.Printf("auth: %#v\n", auth) - fmt.Printf("color: %#v\n", color) - fmt.Printf("currentSuggestion: %#v\n", currentSug) - fmt.Printf("filteredSuggestions: %#v\n", filteredSug) - fmt.Printf("names: %#v\n", names) - fmt.Printf("emoteNames: %#v\n", emoteNames) + for k, v := range map[string]interface{}{ + "timestamp": timestamp, + "auth": auth, + "color": color, + "current suggestion": currentSug, + "current suggestion type": currentSugType, + "filtered suggestions": filteredSug, + "user names": names, + "emote names": emoteNames, + } { + fmt.Printf("%s: %#v\n", k, v) + } } func main() {