Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

log/term: fix build on GOOS=js GOARCH=wasm #993

Merged
merged 1 commit into from Jul 10, 2020
Merged

log/term: fix build on GOOS=js GOARCH=wasm #993

merged 1 commit into from Jul 10, 2020

Commits on Jul 9, 2020

  1. log/term: fix build on GOOS=js GOARCH=wasm

    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.
    mvdan committed Jul 9, 2020
    Copy the full SHA
    fe6fefc View commit details
    Browse the repository at this point in the history