From 3592462d98895509953e84cfaa9e37c95a131ece Mon Sep 17 00:00:00 2001 From: John Starich Date: Thu, 13 Apr 2023 22:36:46 -0500 Subject: [PATCH] Run golangci-lint run --fix --- cmd/editor/plaineditor/typer.go | 4 ++-- http_get.go | 1 + internal/interop/profile.go | 2 +- internal/js/process/process.go | 2 +- main.go | 1 + 5 files changed, 6 insertions(+), 4 deletions(-) diff --git a/cmd/editor/plaineditor/typer.go b/cmd/editor/plaineditor/typer.go index 6ea7806..f670847 100644 --- a/cmd/editor/plaineditor/typer.go +++ b/cmd/editor/plaineditor/typer.go @@ -43,7 +43,7 @@ func handleKeydown(event js.Value) { selectionEnd := target.Get("selectionEnd").Int() key := event.Get("key").String() code := event.Get("code").String() - //metaKey := event.Get("metaKey").Bool() + // metaKey := event.Get("metaKey").Bool() preventDefault := func() { event.Call("preventDefault") @@ -60,7 +60,7 @@ func handleKeydown(event js.Value) { if code == KeyEnter { // TODO restore cmd+enter triggering run button - //if metaKey { + // if metaKey { //preventDefault() //runPlayground() //return diff --git a/http_get.go b/http_get.go index d00aaa0..1004e24 100644 --- a/http_get.go +++ b/http_get.go @@ -1,3 +1,4 @@ +//go:build js // +build js package main diff --git a/internal/interop/profile.go b/internal/interop/profile.go index 059e77e..a9463bd 100644 --- a/internal/interop/profile.go +++ b/internal/interop/profile.go @@ -19,7 +19,7 @@ func ProfileJS(this js.Value, args []js.Value) interface{} { go func() { MemoryProfileJS(this, args) // Re-enable once these profiles actually work in the browser. Currently produces 0 samples. - //TraceProfileJS(this, args) + // TraceProfileJS(this, args) //StartCPUProfileJS(this, args) }() return nil diff --git a/internal/js/process/process.go b/internal/js/process/process.go index 580da9d..c46b156 100644 --- a/internal/js/process/process.go +++ b/internal/js/process/process.go @@ -36,7 +36,7 @@ func Init() { globals.Set("child_process", map[string]interface{}{}) childProcess := globals.Get("child_process") interop.SetFunc(childProcess, "spawn", spawn) - //interop.SetFunc(childProcess, "spawnSync", spawnSync) // TODO is there any way to run spawnSync so we don't hit deadlock? + // interop.SetFunc(childProcess, "spawnSync", spawnSync) // TODO is there any way to run spawnSync so we don't hit deadlock? interop.SetFunc(childProcess, "wait", wait) interop.SetFunc(childProcess, "waitSync", waitSync) } diff --git a/main.go b/main.go index 6b9661e..158b397 100644 --- a/main.go +++ b/main.go @@ -1,3 +1,4 @@ +//go:build js // +build js package main