blob: b4ef5286cd472d46a7ee56fa80faa0f89f2ed52c [file] [log] [blame]
Matteo Scandolo1f49bf52018-11-20 13:56:45 -08001// +build !appengine,!js,windows
Jonathan Hartf86817b2018-08-17 10:35:54 -07002
3package logrus
4
5import (
Matteo Scandolo1f49bf52018-11-20 13:56:45 -08006 "io"
7 "os"
Jonathan Hartf86817b2018-08-17 10:35:54 -07008 "syscall"
Matteo Scandolo1f49bf52018-11-20 13:56:45 -08009
10 sequences "github.com/konsorten/go-windows-terminal-sequences"
Jonathan Hartf86817b2018-08-17 10:35:54 -070011)
12
Matteo Scandolo1f49bf52018-11-20 13:56:45 -080013func initTerminal(w io.Writer) {
14 switch v := w.(type) {
15 case *os.File:
16 sequences.EnableVirtualTerminalProcessing(syscall.Handle(v.Fd()), true)
17 }
Jonathan Hartf86817b2018-08-17 10:35:54 -070018}