Skip to content

Commit

Permalink
log/term: fix build on GOOS=js GOARCH=wasm (#993)
Browse files Browse the repository at this point in the history
Before this fix, the build would fail, as IsTerminal isn't defined on
that platform:

	$ GOOS=js GOARCH=wasm go build
	# github.com/go-kit/kit/log/term
	./term.go:14:6: undefined: IsTerminal

The reason is pretty simple; js/wasm doesn't have syscalls, and thus it
doesn't have an "is a terminal" syscall.

Grouping it with appengine to always assume that the output is not a
terminal is good enough for now, as it at least makes the package build.

No change is needed in any other file, because none of the other
IsTerminal +build lines include js/wasm in any way.
  • Loading branch information
mvdan committed Jul 10, 2020
1 parent ebfffd0 commit 02c7c01
Showing 1 changed file with 1 addition and 1 deletion.
Expand Up @@ -3,7 +3,7 @@
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.

// +build appengine
// +build appengine js

package term

Expand Down

0 comments on commit 02c7c01

Please sign in to comment.