From 867aa5cae1c830b3a71f3254339231ca842fd078 Mon Sep 17 00:00:00 2001 From: Laurent Demailly Date: Wed, 17 Jul 2024 18:02:25 -0700 Subject: [PATCH] Apply suggestions from code review Co-authored-by: ccoVeille <3875889+ccoVeille@users.noreply.github.com> --- goroutine/gid_tinygo.go | 6 +++--- logger.go | 2 +- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/goroutine/gid_tinygo.go b/goroutine/gid_tinygo.go index f4ee02e..8b053bb 100644 --- a/goroutine/gid_tinygo.go +++ b/goroutine/gid_tinygo.go @@ -12,9 +12,9 @@ const IsTinyGo = true var ( counter int64 mapping = make(map[uintptr]int64) - // TinyGo at the moment is single threaded so this is not needed but it's good to have anyway - // in case that changes. It does had ~5ns (from 20ns vs 4ns big go) but it's better to be correct. - // In theory the mutex could be noop on platforms where everything is single threaded. + // TinyGo at the moment is single threaded, so this is not needed, but it's good to have anyway + // in case that changes. It does add ~5ns (from 20ns vs 4ns big go) but it's better to be correct. + // In theory, the mutex could be noop on platforms where everything is single threaded. lock sync.Mutex ) diff --git a/logger.go b/logger.go index 8915c5d..651662f 100644 --- a/logger.go +++ b/logger.go @@ -175,7 +175,7 @@ func (l *JSONEntry) Time() time.Time { //nolint:gochecknoinits // needed func init() { if !isValid(os.Stderr) { // wasm in browser case for instance - SetOutput(os.Stdout) // this could also be invalid too but... we tried. + SetOutput(os.Stdout) // this could also be invalid too, but... we tried. } setLevel(Info) // starting value levelToStrM = make(map[string]Level, 2*len(LevelToStrA))