aboutsummaryrefslogtreecommitdiffhomepage
path: root/vendor/github.com/mattn
diff options
context:
space:
mode:
authorAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
committerAlex Pilon <apilon@hashicorp.com>2019-02-22 18:24:37 -0500
commit15c0b25d011f37e7c20aeca9eaf461f78285b8d9 (patch)
tree255c250a5c9d4801c74092d33b7337d8c14438ff /vendor/github.com/mattn
parent07971ca38143c5faf951d152fba370ddcbe26ad5 (diff)
downloadterraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.gz
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.tar.zst
terraform-provider-statuscake-15c0b25d011f37e7c20aeca9eaf461f78285b8d9.zip
deps: github.com/hashicorp/terraform@sdk-v0.11-with-go-modules
Updated via: go get github.com/hashicorp/terraform@sdk-v0.11-with-go-modules and go mod tidy
Diffstat (limited to 'vendor/github.com/mattn')
-rw-r--r--vendor/github.com/mattn/go-isatty/LICENSE9
-rw-r--r--vendor/github.com/mattn/go-isatty/README.md37
-rw-r--r--vendor/github.com/mattn/go-isatty/doc.go2
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_appengine.go9
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_bsd.go18
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_linux.go18
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_solaris.go16
-rw-r--r--vendor/github.com/mattn/go-isatty/isatty_windows.go19
8 files changed, 128 insertions, 0 deletions
diff --git a/vendor/github.com/mattn/go-isatty/LICENSE b/vendor/github.com/mattn/go-isatty/LICENSE
new file mode 100644
index 0000000..65dc692
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/LICENSE
@@ -0,0 +1,9 @@
1Copyright (c) Yasuhiro MATSUMOTO <mattn.jp@gmail.com>
2
3MIT License (Expat)
4
5Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal in the Software without restriction, including without limitation the rights to use, copy, modify, merge, publish, distribute, sublicense, and/or sell copies of the Software, and to permit persons to whom the Software is furnished to do so, subject to the following conditions:
6
7The above copyright notice and this permission notice shall be included in all copies or substantial portions of the Software.
8
9THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
diff --git a/vendor/github.com/mattn/go-isatty/README.md b/vendor/github.com/mattn/go-isatty/README.md
new file mode 100644
index 0000000..74845de
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/README.md
@@ -0,0 +1,37 @@
1# go-isatty
2
3isatty for golang
4
5## Usage
6
7```go
8package main
9
10import (
11 "fmt"
12 "github.com/mattn/go-isatty"
13 "os"
14)
15
16func main() {
17 if isatty.IsTerminal(os.Stdout.Fd()) {
18 fmt.Println("Is Terminal")
19 } else {
20 fmt.Println("Is Not Terminal")
21 }
22}
23```
24
25## Installation
26
27```
28$ go get github.com/mattn/go-isatty
29```
30
31# License
32
33MIT
34
35# Author
36
37Yasuhiro Matsumoto (a.k.a mattn)
diff --git a/vendor/github.com/mattn/go-isatty/doc.go b/vendor/github.com/mattn/go-isatty/doc.go
new file mode 100644
index 0000000..17d4f90
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/doc.go
@@ -0,0 +1,2 @@
1// Package isatty implements interface to isatty
2package isatty
diff --git a/vendor/github.com/mattn/go-isatty/isatty_appengine.go b/vendor/github.com/mattn/go-isatty/isatty_appengine.go
new file mode 100644
index 0000000..83c5887
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_appengine.go
@@ -0,0 +1,9 @@
1// +build appengine
2
3package isatty
4
5// IsTerminal returns true if the file descriptor is terminal which
6// is always false on on appengine classic which is a sandboxed PaaS.
7func IsTerminal(fd uintptr) bool {
8 return false
9}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_bsd.go b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
new file mode 100644
index 0000000..42f2514
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_bsd.go
@@ -0,0 +1,18 @@
1// +build darwin freebsd openbsd netbsd dragonfly
2// +build !appengine
3
4package isatty
5
6import (
7 "syscall"
8 "unsafe"
9)
10
11const ioctlReadTermios = syscall.TIOCGETA
12
13// IsTerminal return true if the file descriptor is terminal.
14func IsTerminal(fd uintptr) bool {
15 var termios syscall.Termios
16 _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
17 return err == 0
18}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_linux.go b/vendor/github.com/mattn/go-isatty/isatty_linux.go
new file mode 100644
index 0000000..9d24bac
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_linux.go
@@ -0,0 +1,18 @@
1// +build linux
2// +build !appengine
3
4package isatty
5
6import (
7 "syscall"
8 "unsafe"
9)
10
11const ioctlReadTermios = syscall.TCGETS
12
13// IsTerminal return true if the file descriptor is terminal.
14func IsTerminal(fd uintptr) bool {
15 var termios syscall.Termios
16 _, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd, ioctlReadTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
17 return err == 0
18}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_solaris.go b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
new file mode 100644
index 0000000..1f0c6bf
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_solaris.go
@@ -0,0 +1,16 @@
1// +build solaris
2// +build !appengine
3
4package isatty
5
6import (
7 "golang.org/x/sys/unix"
8)
9
10// IsTerminal returns true if the given file descriptor is a terminal.
11// see: http://src.illumos.org/source/xref/illumos-gate/usr/src/lib/libbc/libc/gen/common/isatty.c
12func IsTerminal(fd uintptr) bool {
13 var termio unix.Termio
14 err := unix.IoctlSetTermio(int(fd), unix.TCGETA, &termio)
15 return err == nil
16}
diff --git a/vendor/github.com/mattn/go-isatty/isatty_windows.go b/vendor/github.com/mattn/go-isatty/isatty_windows.go
new file mode 100644
index 0000000..83c398b
--- /dev/null
+++ b/vendor/github.com/mattn/go-isatty/isatty_windows.go
@@ -0,0 +1,19 @@
1// +build windows
2// +build !appengine
3
4package isatty
5
6import (
7 "syscall"
8 "unsafe"
9)
10
11var kernel32 = syscall.NewLazyDLL("kernel32.dll")
12var procGetConsoleMode = kernel32.NewProc("GetConsoleMode")
13
14// IsTerminal return true if the file descriptor is terminal.
15func IsTerminal(fd uintptr) bool {
16 var st uint32
17 r, _, e := syscall.Syscall(procGetConsoleMode.Addr(), 2, fd, uintptr(unsafe.Pointer(&st)), 0)
18 return r != 0 && e == 0
19}