Added terminal detection

This commit is contained in:
2024-03-12 00:25:20 +01:00
parent 393a9ebf17
commit 6a802c3ad8
12 changed files with 37 additions and 79 deletions

View File

@ -1,7 +1,6 @@
package ansi_test
import (
"os"
"testing"
"git.akyoto.dev/go/color"
@ -19,15 +18,6 @@ func TestPrintRaw(t *testing.T) {
}
func testColors() {
ansi.Black.Fprint(os.Stdout, "Black\n")
ansi.White.Fprint(os.Stdout, "White\n")
ansi.Red.Fprint(os.Stdout, "Red\n")
ansi.Green.Fprint(os.Stdout, "Green\n")
ansi.Blue.Fprint(os.Stdout, "Blue\n")
ansi.Yellow.Fprint(os.Stdout, "Yellow\n")
ansi.Magenta.Fprint(os.Stdout, "Magenta\n")
ansi.Cyan.Fprint(os.Stdout, "Cyan\n")
ansi.Black.Print("Black\n")
ansi.White.Print("White\n")
ansi.Red.Print("Red\n")