hiwane / ganrac

Go language version QE tool for Real Algebraic Constraints
MIT License
0 stars 0 forks source link

リダイレクト等で color を無効化する #40

Closed hiwane closed 1 year ago

hiwane commented 1 year ago

https://ryochack.hatenablog.com/entry/2013/07/15/232207

package main

import (
    "fmt"
    "os"
    term "code.google.com/p/go.crypto/ssh/terminal"
)

func main() {
    fd := os.Stdout.Fd()
    isTerminal := term.IsTerminal(int(fd))
    fmt.Printf("fd=%v, isTerm=%v\n", fd, isTerminal)
}