mirror of
https://github.com/kubernetes-sigs/kustomize.git
synced 2026-07-17 17:52:12 +00:00
manually add dependency on go-getter
This commit is contained in:
11
vendor/github.com/ulikunitz/xz/internal/term/ioctl_bsd.go
generated
vendored
Normal file
11
vendor/github.com/ulikunitz/xz/internal/term/ioctl_bsd.go
generated
vendored
Normal file
@@ -0,0 +1,11 @@
|
||||
// Copyright 2014-2017 Ulrich Kunitz. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin dragonfly freebsd netbsd openbsd
|
||||
|
||||
package term
|
||||
|
||||
import "syscall"
|
||||
|
||||
const ioctlGetTermios = syscall.TIOCGETA
|
||||
7
vendor/github.com/ulikunitz/xz/internal/term/ioctl_linux.go
generated
vendored
Normal file
7
vendor/github.com/ulikunitz/xz/internal/term/ioctl_linux.go
generated
vendored
Normal file
@@ -0,0 +1,7 @@
|
||||
// Copyright 2014-2017 Ulrich Kunitz. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package term
|
||||
|
||||
const ioctlGetTermios = 0x5401 // syscall.TCGETS
|
||||
21
vendor/github.com/ulikunitz/xz/internal/term/isterminal.go
generated
vendored
Normal file
21
vendor/github.com/ulikunitz/xz/internal/term/isterminal.go
generated
vendored
Normal file
@@ -0,0 +1,21 @@
|
||||
// Copyright 2014-2017 Ulrich Kunitz. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd
|
||||
|
||||
// Package term provides the IsTerminal function.
|
||||
package term
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
var termios syscall.Termios
|
||||
_, _, err := syscall.Syscall6(syscall.SYS_IOCTL, fd,
|
||||
ioctlGetTermios, uintptr(unsafe.Pointer(&termios)), 0, 0, 0)
|
||||
return err == 0
|
||||
}
|
||||
22
vendor/github.com/ulikunitz/xz/internal/term/isterminal_windows.go
generated
vendored
Normal file
22
vendor/github.com/ulikunitz/xz/internal/term/isterminal_windows.go
generated
vendored
Normal file
@@ -0,0 +1,22 @@
|
||||
// Copyright 2014-2017 Ulrich Kunitz. All rights reserved.
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
package term
|
||||
|
||||
import (
|
||||
"syscall"
|
||||
"unsafe"
|
||||
)
|
||||
|
||||
var kernel32 = syscall.NewLazyDLL("kernel32.dll")
|
||||
|
||||
var getConsoleMode = kernel32.NewProc("GetConsoleMode")
|
||||
|
||||
// IsTerminal returns true if the given file descriptor is a terminal.
|
||||
func IsTerminal(fd uintptr) bool {
|
||||
var st uint32
|
||||
r, _, e := syscall.Syscall(getConsoleMode.Addr(),
|
||||
2, fd, uintptr(unsafe.Pointer(&st)), 0)
|
||||
return r != 0 && e == 0
|
||||
}
|
||||
Reference in New Issue
Block a user