Bump docker/docker and containerd/console

Signed-off-by: ulyssessouza <ulyssessouza@gmail.com>
This commit is contained in:
ulyssessouza
2019-12-10 23:37:11 +01:00
parent a0490a8720
commit 9f4f945d4f
328 changed files with 36663 additions and 6952 deletions

View File

@ -1,17 +1,16 @@
language: go
go:
- "1.10.x"
- "1.11.x"
- "1.12.x"
- "1.13.x"
go_import_path: github.com/containerd/console
env:
- GO111MODULE=on
install:
- go get -d
- GOOS=openbsd go get -d
- GOOS=solaris go get -d
- GOOS=windows go get -d
- go get -u github.com/vbatts/git-validation
- go get -u github.com/kunalkushwaha/ltag
- pushd ..; go get -u github.com/vbatts/git-validation; popd
- pushd ..; go get -u github.com/kunalkushwaha/ltag; popd
before_script:
- pushd ..; git clone https://github.com/containerd/project; popd
@ -19,6 +18,7 @@ before_script:
script:
- DCO_VERBOSITY=-q ../project/script/validate/dco
- ../project/script/validate/fileheader ../project/
- travis_wait ../project/script/validate/vendor
- go test -race
- GOOS=openbsd go build
- GOOS=openbsd go test -c

View File

@ -24,10 +24,17 @@ import (
var ErrNotAConsole = errors.New("provided file is not a console")
type File interface {
io.ReadWriteCloser
// Fd returns its file descriptor
Fd() uintptr
// Name returns its file name
Name() string
}
type Console interface {
io.Reader
io.Writer
io.Closer
File
// Resize resizes the console to the provided window size
Resize(WinSize) error
@ -42,10 +49,6 @@ type Console interface {
Reset() error
// Size returns the window size of the console
Size() (WinSize, error)
// Fd returns the console's file descriptor
Fd() uintptr
// Name returns the console's file name
Name() string
}
// WinSize specifies the window size of the console
@ -70,7 +73,7 @@ func Current() Console {
}
// ConsoleFromFile returns a console using the provided file
func ConsoleFromFile(f *os.File) (Console, error) {
func ConsoleFromFile(f File) (Console, error) {
if err := checkConsole(f); err != nil {
return nil, err
}

View File

@ -47,7 +47,7 @@ func NewPty() (Console, string, error) {
}
type master struct {
f *os.File
f File
original *unix.Termios
}
@ -122,7 +122,7 @@ func (m *master) Name() string {
}
// checkConsole checks if the provided file is a console
func checkConsole(f *os.File) error {
func checkConsole(f File) error {
var termios unix.Termios
if tcget(f.Fd(), &termios) != nil {
return ErrNotAConsole
@ -130,7 +130,7 @@ func checkConsole(f *os.File) error {
return nil
}
func newMaster(f *os.File) (Console, error) {
func newMaster(f File) (Console, error) {
m := &master{
f: f,
}

View File

@ -198,7 +198,7 @@ func makeInputRaw(fd windows.Handle, mode uint32) error {
return nil
}
func checkConsole(f *os.File) error {
func checkConsole(f File) error {
var mode uint32
if err := windows.GetConsoleMode(windows.Handle(f.Fd()), &mode); err != nil {
return err
@ -206,7 +206,7 @@ func checkConsole(f *os.File) error {
return nil
}
func newMaster(f *os.File) (Console, error) {
func newMaster(f File) (Console, error) {
if f != os.Stdin && f != os.Stdout && f != os.Stderr {
return nil, errors.New("creating a console from a file is not supported on windows")
}

8
vendor/github.com/containerd/console/go.mod generated vendored Normal file
View File

@ -0,0 +1,8 @@
module github.com/containerd/console
go 1.13
require (
github.com/pkg/errors v0.8.1
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e
)

4
vendor/github.com/containerd/console/go.sum generated vendored Normal file
View File

@ -0,0 +1,4 @@
github.com/pkg/errors v0.8.1 h1:iURUrRGxPUNPdy5/HRSm+Yj6okJ6UtLINN0Q9M4+h3I=
github.com/pkg/errors v0.8.1/go.mod h1:bwawxfHBFNV+L2hUp1rHADufV3IMtnDRdf1r5NINEl0=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e h1:N7DeIrjYszNmSW409R3frPPwglRwMkXSBzwVbkOjLLA=
golang.org/x/sys v0.0.0-20191120155948-bd437916bb0e/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=