f-55: lab: l'outil devient labctl, noms et chemins neutres #55
Signed-off-by: GnomeZworc <nicolas.boufidjeline@g3e.fr>
This commit is contained in:
parent
aceffe7b58
commit
35f394796d
16 changed files with 147 additions and 147 deletions
14
cmd/labctl/terminal.go
Normal file
14
cmd/labctl/terminal.go
Normal file
|
|
@ -0,0 +1,14 @@
|
|||
//go:build linux || darwin
|
||||
|
||||
package main
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
func isTerminal(f *os.File) bool {
|
||||
_, err := unix.IoctlGetTermios(int(f.Fd()), ioctlReadTermios)
|
||||
return err == nil
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue