Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
K
k3s
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Registry
Registry
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Jacklull
k3s
Commits
ec739269
Commit
ec739269
authored
Apr 11, 2018
by
Mike Danese
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
godeps: remove github.com/kr/pty after #62360
parent
78ee5d56
Hide whitespace changes
Inline
Side-by-side
Showing
29 changed files
with
0 additions
and
680 deletions
+0
-680
Godeps.json
Godeps/Godeps.json
+0
-5
LICENSES
Godeps/LICENSES
+0
-31
BUILD
vendor/BUILD
+0
-1
.gitignore
vendor/github.com/kr/pty/.gitignore
+0
-4
BUILD
vendor/github.com/kr/pty/BUILD
+0
-102
License
vendor/github.com/kr/pty/License
+0
-23
README.md
vendor/github.com/kr/pty/README.md
+0
-36
doc.go
vendor/github.com/kr/pty/doc.go
+0
-16
ioctl.go
vendor/github.com/kr/pty/ioctl.go
+0
-11
ioctl_bsd.go
vendor/github.com/kr/pty/ioctl_bsd.go
+0
-39
mktypes.bash
vendor/github.com/kr/pty/mktypes.bash
+0
-19
pty_darwin.go
vendor/github.com/kr/pty/pty_darwin.go
+0
-60
pty_freebsd.go
vendor/github.com/kr/pty/pty_freebsd.go
+0
-73
pty_linux.go
vendor/github.com/kr/pty/pty_linux.go
+0
-46
pty_unsupported.go
vendor/github.com/kr/pty/pty_unsupported.go
+0
-11
run.go
vendor/github.com/kr/pty/run.go
+0
-32
types.go
vendor/github.com/kr/pty/types.go
+0
-10
types_freebsd.go
vendor/github.com/kr/pty/types_freebsd.go
+0
-15
util.go
vendor/github.com/kr/pty/util.go
+0
-35
ztypes_386.go
vendor/github.com/kr/pty/ztypes_386.go
+0
-9
ztypes_amd64.go
vendor/github.com/kr/pty/ztypes_amd64.go
+0
-9
ztypes_arm.go
vendor/github.com/kr/pty/ztypes_arm.go
+0
-9
ztypes_arm64.go
vendor/github.com/kr/pty/ztypes_arm64.go
+0
-11
ztypes_freebsd_386.go
vendor/github.com/kr/pty/ztypes_freebsd_386.go
+0
-13
ztypes_freebsd_amd64.go
vendor/github.com/kr/pty/ztypes_freebsd_amd64.go
+0
-14
ztypes_freebsd_arm.go
vendor/github.com/kr/pty/ztypes_freebsd_arm.go
+0
-13
ztypes_ppc64.go
vendor/github.com/kr/pty/ztypes_ppc64.go
+0
-11
ztypes_ppc64le.go
vendor/github.com/kr/pty/ztypes_ppc64le.go
+0
-11
ztypes_s390x.go
vendor/github.com/kr/pty/ztypes_s390x.go
+0
-11
No files found.
Godeps/Godeps.json
View file @
ec739269
...
@@ -2075,11 +2075,6 @@
...
@@ -2075,11 +2075,6 @@
"Rev"
:
"f31442d60e51465c69811e2107ae978868dbea5c"
"Rev"
:
"f31442d60e51465c69811e2107ae978868dbea5c"
},
},
{
{
"ImportPath"
:
"github.com/kr/pty"
,
"Comment"
:
"release.r56-29-gf7ee69f"
,
"Rev"
:
"f7ee69f31298ecbe5d2b349c711e2547a617d398"
},
{
"ImportPath"
:
"github.com/kr/text"
,
"ImportPath"
:
"github.com/kr/text"
,
"Rev"
:
"6807e777504f54ad073ecef66747de158294b639"
"Rev"
:
"6807e777504f54ad073ecef66747de158294b639"
},
},
...
...
Godeps/LICENSES
View file @
ec739269
...
@@ -71233,37 +71233,6 @@ THE SOFTWARE.
...
@@ -71233,37 +71233,6 @@ THE SOFTWARE.
================================================================================
================================================================================
= vendor/github.com/kr/pty licensed under: =
Copyright (c) 2011 Keith Rarick
Permission 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:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.
THE 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.
= vendor/github.com/kr/pty/License 93958070863d769117fa33b129020050
================================================================================
================================================================================
= vendor/github.com/kr/text licensed under: =
= vendor/github.com/kr/text licensed under: =
Copyright 2012 Keith Rarick
Copyright 2012 Keith Rarick
vendor/BUILD
View file @
ec739269
...
@@ -283,7 +283,6 @@ filegroup(
...
@@ -283,7 +283,6 @@ filegroup(
"//vendor/github.com/kardianos/osext:all-srcs",
"//vendor/github.com/kardianos/osext:all-srcs",
"//vendor/github.com/kr/fs:all-srcs",
"//vendor/github.com/kr/fs:all-srcs",
"//vendor/github.com/kr/pretty:all-srcs",
"//vendor/github.com/kr/pretty:all-srcs",
"//vendor/github.com/kr/pty:all-srcs",
"//vendor/github.com/kr/text:all-srcs",
"//vendor/github.com/kr/text:all-srcs",
"//vendor/github.com/kubernetes/repo-infra/kazel:all-srcs",
"//vendor/github.com/kubernetes/repo-infra/kazel:all-srcs",
"//vendor/github.com/libopenstorage/openstorage/api:all-srcs",
"//vendor/github.com/libopenstorage/openstorage/api:all-srcs",
...
...
vendor/github.com/kr/pty/.gitignore
deleted
100644 → 0
View file @
78ee5d56
[568].out
_go*
_test*
_obj
vendor/github.com/kr/pty/BUILD
deleted
100644 → 0
View file @
78ee5d56
load("@io_bazel_rules_go//go:def.bzl", "go_library")
go_library(
name = "go_default_library",
srcs = [
"doc.go",
"ioctl.go",
"run.go",
"util.go",
] + select({
"@io_bazel_rules_go//go/platform:android": [
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:darwin": [
"ioctl_bsd.go",
"pty_darwin.go",
],
"@io_bazel_rules_go//go/platform:dragonfly": [
"ioctl_bsd.go",
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:freebsd": [
"ioctl_bsd.go",
"pty_freebsd.go",
],
"@io_bazel_rules_go//go/platform:linux": [
"pty_linux.go",
],
"@io_bazel_rules_go//go/platform:nacl": [
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:netbsd": [
"ioctl_bsd.go",
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:openbsd": [
"ioctl_bsd.go",
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:plan9": [
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:solaris": [
"pty_unsupported.go",
],
"@io_bazel_rules_go//go/platform:windows": [
"pty_unsupported.go",
],
"//conditions:default": [],
}) + select({
"@io_bazel_rules_go//go/platform:386": [
"ztypes_386.go",
],
"@io_bazel_rules_go//go/platform:amd64": [
"ztypes_amd64.go",
],
"@io_bazel_rules_go//go/platform:arm": [
"ztypes_arm.go",
],
"@io_bazel_rules_go//go/platform:arm64": [
"ztypes_arm64.go",
],
"@io_bazel_rules_go//go/platform:ppc64": [
"ztypes_ppc64.go",
],
"@io_bazel_rules_go//go/platform:ppc64le": [
"ztypes_ppc64le.go",
],
"@io_bazel_rules_go//go/platform:s390x": [
"ztypes_s390x.go",
],
"//conditions:default": [],
}) + select({
"@io_bazel_rules_go//go/platform:freebsd_386": [
"ztypes_freebsd_386.go",
],
"@io_bazel_rules_go//go/platform:freebsd_amd64": [
"ztypes_freebsd_amd64.go",
],
"@io_bazel_rules_go//go/platform:freebsd_arm": [
"ztypes_freebsd_arm.go",
],
"//conditions:default": [],
}),
cgo = True,
importpath = "github.com/kr/pty",
visibility = ["//visibility:public"],
)
filegroup(
name = "package-srcs",
srcs = glob(["**"]),
tags = ["automanaged"],
visibility = ["//visibility:private"],
)
filegroup(
name = "all-srcs",
srcs = [":package-srcs"],
tags = ["automanaged"],
visibility = ["//visibility:public"],
)
vendor/github.com/kr/pty/License
deleted
100644 → 0
View file @
78ee5d56
Copyright (c) 2011 Keith Rarick
Permission 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:
The above copyright notice and this permission notice shall
be included in all copies or substantial portions of the
Software.
THE 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.
vendor/github.com/kr/pty/README.md
deleted
100644 → 0
View file @
78ee5d56
# pty
Pty is a Go package for using unix pseudo-terminals.
## Install
go get github.com/kr/pty
## Example
```
go
package
main
import
(
"github.com/kr/pty"
"io"
"os"
"os/exec"
)
func
main
()
{
c
:=
exec
.
Command
(
"grep"
,
"--color=auto"
,
"bar"
)
f
,
err
:=
pty
.
Start
(
c
)
if
err
!=
nil
{
panic
(
err
)
}
go
func
()
{
f
.
Write
([]
byte
(
"foo
\n
"
))
f
.
Write
([]
byte
(
"bar
\n
"
))
f
.
Write
([]
byte
(
"baz
\n
"
))
f
.
Write
([]
byte
{
4
})
// EOT
}()
io
.
Copy
(
os
.
Stdout
,
f
)
}
```
vendor/github.com/kr/pty/doc.go
deleted
100644 → 0
View file @
78ee5d56
// Package pty provides functions for working with Unix terminals.
package
pty
import
(
"errors"
"os"
)
// ErrUnsupported is returned if a function is not
// available on the current platform.
var
ErrUnsupported
=
errors
.
New
(
"unsupported"
)
// Opens a pty and its corresponding tty.
func
Open
()
(
pty
,
tty
*
os
.
File
,
err
error
)
{
return
open
()
}
vendor/github.com/kr/pty/ioctl.go
deleted
100644 → 0
View file @
78ee5d56
package
pty
import
"syscall"
func
ioctl
(
fd
,
cmd
,
ptr
uintptr
)
error
{
_
,
_
,
e
:=
syscall
.
Syscall
(
syscall
.
SYS_IOCTL
,
fd
,
cmd
,
ptr
)
if
e
!=
0
{
return
e
}
return
nil
}
vendor/github.com/kr/pty/ioctl_bsd.go
deleted
100644 → 0
View file @
78ee5d56
// +build darwin dragonfly freebsd netbsd openbsd
package
pty
// from <sys/ioccom.h>
const
(
_IOC_VOID
uintptr
=
0x20000000
_IOC_OUT
uintptr
=
0x40000000
_IOC_IN
uintptr
=
0x80000000
_IOC_IN_OUT
uintptr
=
_IOC_OUT
|
_IOC_IN
_IOC_DIRMASK
=
_IOC_VOID
|
_IOC_OUT
|
_IOC_IN
_IOC_PARAM_SHIFT
=
13
_IOC_PARAM_MASK
=
(
1
<<
_IOC_PARAM_SHIFT
)
-
1
)
func
_IOC_PARM_LEN
(
ioctl
uintptr
)
uintptr
{
return
(
ioctl
>>
16
)
&
_IOC_PARAM_MASK
}
func
_IOC
(
inout
uintptr
,
group
byte
,
ioctl_num
uintptr
,
param_len
uintptr
)
uintptr
{
return
inout
|
(
param_len
&
_IOC_PARAM_MASK
)
<<
16
|
uintptr
(
group
)
<<
8
|
ioctl_num
}
func
_IO
(
group
byte
,
ioctl_num
uintptr
)
uintptr
{
return
_IOC
(
_IOC_VOID
,
group
,
ioctl_num
,
0
)
}
func
_IOR
(
group
byte
,
ioctl_num
uintptr
,
param_len
uintptr
)
uintptr
{
return
_IOC
(
_IOC_OUT
,
group
,
ioctl_num
,
param_len
)
}
func
_IOW
(
group
byte
,
ioctl_num
uintptr
,
param_len
uintptr
)
uintptr
{
return
_IOC
(
_IOC_IN
,
group
,
ioctl_num
,
param_len
)
}
func
_IOWR
(
group
byte
,
ioctl_num
uintptr
,
param_len
uintptr
)
uintptr
{
return
_IOC
(
_IOC_IN_OUT
,
group
,
ioctl_num
,
param_len
)
}
vendor/github.com/kr/pty/mktypes.bash
deleted
100755 → 0
View file @
78ee5d56
#!/usr/bin/env bash
GOOSARCH
=
"
${
GOOS
}
_
${
GOARCH
}
"
case
"
$GOOSARCH
"
in
_
*
|
*
_
|
_
)
echo
'undefined $GOOS_$GOARCH:'
"
$GOOSARCH
"
1>&2
exit
1
;;
esac
GODEFS
=
"go tool cgo -godefs"
$GODEFS
types.go |gofmt
>
ztypes_
$GOARCH
.go
case
$GOOS
in
freebsd
)
$GODEFS
types_
$GOOS
.go |gofmt
>
ztypes_
$GOOSARCH
.go
;;
esac
vendor/github.com/kr/pty/pty_darwin.go
deleted
100644 → 0
View file @
78ee5d56
package
pty
import
(
"errors"
"os"
"syscall"
"unsafe"
)
func
open
()
(
pty
,
tty
*
os
.
File
,
err
error
)
{
p
,
err
:=
os
.
OpenFile
(
"/dev/ptmx"
,
os
.
O_RDWR
,
0
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
sname
,
err
:=
ptsname
(
p
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
err
=
grantpt
(
p
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
err
=
unlockpt
(
p
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
t
,
err
:=
os
.
OpenFile
(
sname
,
os
.
O_RDWR
,
0
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
return
p
,
t
,
nil
}
func
ptsname
(
f
*
os
.
File
)
(
string
,
error
)
{
n
:=
make
([]
byte
,
_IOC_PARM_LEN
(
syscall
.
TIOCPTYGNAME
))
err
:=
ioctl
(
f
.
Fd
(),
syscall
.
TIOCPTYGNAME
,
uintptr
(
unsafe
.
Pointer
(
&
n
[
0
])))
if
err
!=
nil
{
return
""
,
err
}
for
i
,
c
:=
range
n
{
if
c
==
0
{
return
string
(
n
[
:
i
]),
nil
}
}
return
""
,
errors
.
New
(
"TIOCPTYGNAME string not NUL-terminated"
)
}
func
grantpt
(
f
*
os
.
File
)
error
{
return
ioctl
(
f
.
Fd
(),
syscall
.
TIOCPTYGRANT
,
0
)
}
func
unlockpt
(
f
*
os
.
File
)
error
{
return
ioctl
(
f
.
Fd
(),
syscall
.
TIOCPTYUNLK
,
0
)
}
vendor/github.com/kr/pty/pty_freebsd.go
deleted
100644 → 0
View file @
78ee5d56
package
pty
import
(
"errors"
"os"
"syscall"
"unsafe"
)
func
posix_openpt
(
oflag
int
)
(
fd
int
,
err
error
)
{
r0
,
_
,
e1
:=
syscall
.
Syscall
(
syscall
.
SYS_POSIX_OPENPT
,
uintptr
(
oflag
),
0
,
0
)
fd
=
int
(
r0
)
if
e1
!=
0
{
err
=
e1
}
return
}
func
open
()
(
pty
,
tty
*
os
.
File
,
err
error
)
{
fd
,
err
:=
posix_openpt
(
syscall
.
O_RDWR
|
syscall
.
O_CLOEXEC
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
p
:=
os
.
NewFile
(
uintptr
(
fd
),
"/dev/pts"
)
sname
,
err
:=
ptsname
(
p
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
t
,
err
:=
os
.
OpenFile
(
"/dev/"
+
sname
,
os
.
O_RDWR
,
0
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
return
p
,
t
,
nil
}
func
isptmaster
(
fd
uintptr
)
(
bool
,
error
)
{
err
:=
ioctl
(
fd
,
syscall
.
TIOCPTMASTER
,
0
)
return
err
==
nil
,
err
}
var
(
emptyFiodgnameArg
fiodgnameArg
ioctl_FIODGNAME
=
_IOW
(
'f'
,
120
,
unsafe
.
Sizeof
(
emptyFiodgnameArg
))
)
func
ptsname
(
f
*
os
.
File
)
(
string
,
error
)
{
master
,
err
:=
isptmaster
(
f
.
Fd
())
if
err
!=
nil
{
return
""
,
err
}
if
!
master
{
return
""
,
syscall
.
EINVAL
}
const
n
=
_C_SPECNAMELEN
+
1
var
(
buf
=
make
([]
byte
,
n
)
arg
=
fiodgnameArg
{
Len
:
n
,
Buf
:
(
*
byte
)(
unsafe
.
Pointer
(
&
buf
[
0
]))}
)
err
=
ioctl
(
f
.
Fd
(),
ioctl_FIODGNAME
,
uintptr
(
unsafe
.
Pointer
(
&
arg
)))
if
err
!=
nil
{
return
""
,
err
}
for
i
,
c
:=
range
buf
{
if
c
==
0
{
return
string
(
buf
[
:
i
]),
nil
}
}
return
""
,
errors
.
New
(
"FIODGNAME string not NUL-terminated"
)
}
vendor/github.com/kr/pty/pty_linux.go
deleted
100644 → 0
View file @
78ee5d56
package
pty
import
(
"os"
"strconv"
"syscall"
"unsafe"
)
func
open
()
(
pty
,
tty
*
os
.
File
,
err
error
)
{
p
,
err
:=
os
.
OpenFile
(
"/dev/ptmx"
,
os
.
O_RDWR
,
0
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
sname
,
err
:=
ptsname
(
p
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
err
=
unlockpt
(
p
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
t
,
err
:=
os
.
OpenFile
(
sname
,
os
.
O_RDWR
|
syscall
.
O_NOCTTY
,
0
)
if
err
!=
nil
{
return
nil
,
nil
,
err
}
return
p
,
t
,
nil
}
func
ptsname
(
f
*
os
.
File
)
(
string
,
error
)
{
var
n
_C_uint
err
:=
ioctl
(
f
.
Fd
(),
syscall
.
TIOCGPTN
,
uintptr
(
unsafe
.
Pointer
(
&
n
)))
if
err
!=
nil
{
return
""
,
err
}
return
"/dev/pts/"
+
strconv
.
Itoa
(
int
(
n
)),
nil
}
func
unlockpt
(
f
*
os
.
File
)
error
{
var
u
_C_int
// use TIOCSPTLCK with a zero valued arg to clear the slave pty lock
return
ioctl
(
f
.
Fd
(),
syscall
.
TIOCSPTLCK
,
uintptr
(
unsafe
.
Pointer
(
&
u
)))
}
vendor/github.com/kr/pty/pty_unsupported.go
deleted
100644 → 0
View file @
78ee5d56
// +build !linux,!darwin,!freebsd
package
pty
import
(
"os"
)
func
open
()
(
pty
,
tty
*
os
.
File
,
err
error
)
{
return
nil
,
nil
,
ErrUnsupported
}
vendor/github.com/kr/pty/run.go
deleted
100644 → 0
View file @
78ee5d56
package
pty
import
(
"os"
"os/exec"
"syscall"
)
// Start assigns a pseudo-terminal tty os.File to c.Stdin, c.Stdout,
// and c.Stderr, calls c.Start, and returns the File of the tty's
// corresponding pty.
func
Start
(
c
*
exec
.
Cmd
)
(
pty
*
os
.
File
,
err
error
)
{
pty
,
tty
,
err
:=
Open
()
if
err
!=
nil
{
return
nil
,
err
}
defer
tty
.
Close
()
c
.
Stdout
=
tty
c
.
Stdin
=
tty
c
.
Stderr
=
tty
if
c
.
SysProcAttr
==
nil
{
c
.
SysProcAttr
=
&
syscall
.
SysProcAttr
{}
}
c
.
SysProcAttr
.
Setctty
=
true
c
.
SysProcAttr
.
Setsid
=
true
err
=
c
.
Start
()
if
err
!=
nil
{
pty
.
Close
()
return
nil
,
err
}
return
pty
,
err
}
vendor/github.com/kr/pty/types.go
deleted
100644 → 0
View file @
78ee5d56
// +build ignore
package
pty
import
"C"
type
(
_C_int
C
.
int
_C_uint
C
.
uint
)
vendor/github.com/kr/pty/types_freebsd.go
deleted
100644 → 0
View file @
78ee5d56
// +build ignore
package
pty
/*
#include <sys/param.h>
#include <sys/filio.h>
*/
import
"C"
const
(
_C_SPECNAMELEN
=
C
.
SPECNAMELEN
/* max length of devicename */
)
type
fiodgnameArg
C
.
struct_fiodgname_arg
vendor/github.com/kr/pty/util.go
deleted
100644 → 0
View file @
78ee5d56
package
pty
import
(
"os"
"syscall"
"unsafe"
)
// Getsize returns the number of rows (lines) and cols (positions
// in each line) in terminal t.
func
Getsize
(
t
*
os
.
File
)
(
rows
,
cols
int
,
err
error
)
{
var
ws
winsize
err
=
windowrect
(
&
ws
,
t
.
Fd
())
return
int
(
ws
.
ws_row
),
int
(
ws
.
ws_col
),
err
}
type
winsize
struct
{
ws_row
uint16
ws_col
uint16
ws_xpixel
uint16
ws_ypixel
uint16
}
func
windowrect
(
ws
*
winsize
,
fd
uintptr
)
error
{
_
,
_
,
errno
:=
syscall
.
Syscall
(
syscall
.
SYS_IOCTL
,
fd
,
syscall
.
TIOCGWINSZ
,
uintptr
(
unsafe
.
Pointer
(
ws
)),
)
if
errno
!=
0
{
return
syscall
.
Errno
(
errno
)
}
return
nil
}
vendor/github.com/kr/pty/ztypes_386.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
vendor/github.com/kr/pty/ztypes_amd64.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
vendor/github.com/kr/pty/ztypes_arm.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
vendor/github.com/kr/pty/ztypes_arm64.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
// +build arm64
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
vendor/github.com/kr/pty/ztypes_freebsd_386.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go
package
pty
const
(
_C_SPECNAMELEN
=
0x3f
)
type
fiodgnameArg
struct
{
Len
int32
Buf
*
byte
}
vendor/github.com/kr/pty/ztypes_freebsd_amd64.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go
package
pty
const
(
_C_SPECNAMELEN
=
0x3f
)
type
fiodgnameArg
struct
{
Len
int32
Pad_cgo_0
[
4
]
byte
Buf
*
byte
}
vendor/github.com/kr/pty/ztypes_freebsd_arm.go
deleted
100644 → 0
View file @
78ee5d56
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types_freebsd.go
package
pty
const
(
_C_SPECNAMELEN
=
0x3f
)
type
fiodgnameArg
struct
{
Len
int32
Buf
*
byte
}
vendor/github.com/kr/pty/ztypes_ppc64.go
deleted
100644 → 0
View file @
78ee5d56
// +build ppc64
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
vendor/github.com/kr/pty/ztypes_ppc64le.go
deleted
100644 → 0
View file @
78ee5d56
// +build ppc64le
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
vendor/github.com/kr/pty/ztypes_s390x.go
deleted
100644 → 0
View file @
78ee5d56
// +build s390x
// Created by cgo -godefs - DO NOT EDIT
// cgo -godefs types.go
package
pty
type
(
_C_int
int32
_C_uint
uint32
)
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment