diff options
Diffstat (limited to 'vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go')
-rw-r--r-- | vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go | 27 |
1 files changed, 0 insertions, 27 deletions
diff --git a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go b/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go deleted file mode 100644 index 0146845..0000000 --- a/vendor/github.com/fsouza/go-dockerclient/external/github.com/Sirupsen/logrus/terminal_windows.go +++ /dev/null | |||
@@ -1,27 +0,0 @@ | |||
1 | // Based on ssh/terminal: | ||
2 | // Copyright 2011 The Go Authors. All rights reserved. | ||
3 | // Use of this source code is governed by a BSD-style | ||
4 | // license that can be found in the LICENSE file. | ||
5 | |||
6 | // +build windows | ||
7 | |||
8 | package logrus | ||
9 | |||
10 | import ( | ||
11 | "syscall" | ||
12 | "unsafe" | ||
13 | ) | ||
14 | |||
15 | var kernel32 = syscall.NewLazyDLL("kernel32.dll") | ||
16 | |||
17 | var ( | ||
18 | procGetConsoleMode = kernel32.NewProc("GetConsoleMode") | ||
19 | ) | ||
20 | |||
21 | // IsTerminal returns true if stderr's file descriptor is a terminal. | ||
22 | func IsTerminal() bool { | ||
23 | fd := syscall.Stderr | ||
24 | var st uint32 | ||
25 | r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, uintptr(fd), uintptr(unsafe.Pointer(&st)), 0) | ||
26 | return r != 0 && e == 0 | ||
27 | } | ||