1package main
2
3import (
4	"fmt"
5	"os"
6	"runtime"
7	"strconv"
8
9	"github.com/gookit/color"
10	// "github.com/gookit/goutil/dump"
11)
12
13// go run ./_examples/envcheck.go
14// COLOR_DEBUG_MODE=on go run ./_examples/envcheck.go
15func main() {
16	fmt.Println("current OS:", runtime.GOOS)
17
18	fmt.Println("Terminal Color Level:", color.TermColorLevel())
19	fmt.Println("Support Basic Color:", color.SupportColor())
20	fmt.Println("Support 256 Color:", color.Support256Color())
21	fmt.Println("Support True Color:", color.SupportTrueColor())
22
23	if es := color.InnerErrs(); len(es) > 0 {
24		fmt.Println("inner errors:", es)
25	}
26
27	termVal := os.Getenv("TERM")
28	fmt.Println("----------------TERM value is:", termVal, "---------------")
29	fmt.Println(
30		termVal[0:1],
31		strconv.FormatUint(uint64(termVal[0]), 16),
32	)
33
34	// dump.P(os.Environ())
35	// fmt.Println(os.Environ())
36}
37