mirror of
https://github.com/dutchcoders/transfer.sh.git
synced 2024-12-05 02:10:18 +01:00
16 lines
205 B
Go
16 lines
205 B
Go
|
package main
|
||
|
|
||
|
import (
|
||
|
"fmt"
|
||
|
"github.com/mattn/go-isatty"
|
||
|
"os"
|
||
|
)
|
||
|
|
||
|
func main() {
|
||
|
if isatty.IsTerminal(int(os.Stdout.Fd())) {
|
||
|
fmt.Println("Is Terminal")
|
||
|
} else {
|
||
|
fmt.Println("Is Not Terminal")
|
||
|
}
|
||
|
}
|