mirror of
https://github.com/mudler/luet.git
synced 2025-06-29 08:46:51 +00:00
- Ditch multiple libraries for progressbar, spinner, colors and replace with pterm - Detect when running on terminal and disable automatically spinner - Add support for multiple progress bars - Huge rewrite of the configuration part. No more crazy stuff with viper CLI commands now correctly overrides default config file as expected - Limit banner to be displayed on relevant parts Fixes #211 Fixes #105 Fixes #247 Fixes #233
13 lines
247 B
Go
13 lines
247 B
Go
// +build darwin dragonfly freebsd netbsd openbsd
|
|
|
|
package terminal
|
|
|
|
import "golang.org/x/sys/unix"
|
|
|
|
const ioctlReadTermios = unix.TIOCGETA
|
|
|
|
func isTerminal(fd int) bool {
|
|
_, err := unix.IoctlGetTermios(fd, ioctlReadTermios)
|
|
return err == nil
|
|
}
|