032a334035
Enable building using the tinygo compiler, together with the `wasi` target. This combination requires different handling compared to go >= 1.21 and the `wasip1` target. That's because Tinygo compiles using the GOOS set to `linux` and the `GOARCH` set to `wasi`. Signed-off-by: Flavio Castelli <fcastelli@suse.com>
16 lines
296 B
Go
16 lines
296 B
Go
//go:build (linux || aix || zos) && !js && !wasi
|
|
// +build linux aix zos
|
|
// +build !js
|
|
// +build !wasi
|
|
|
|
package logrus
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
const ioctlReadTermios = unix.TCGETS
|
|
|
|
func isTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
|
|
return err == nil
|
|
}
|