Procházet zdrojové kódy

remove deprecated pkg/term, pkg/term/windows

This package was deprecated in 41d4112e89473095947b4fb4ebf10e8258e4273c, which
was part of the 20.10 release, so consumers of this package should've been
able to migrate to the new location.

Signed-off-by: Sebastiaan van Stijn <github@gone.nl>
Sebastiaan van Stijn před 3 roky
rodič
revize
4a6dc85e40

+ 0 - 84
pkg/term/deprecated.go

@@ -1,84 +0,0 @@
-// Package term provides structures and helper functions to work with
-// terminal (state, sizes).
-//
-// Deprecated: use github.com/moby/term instead
-package term // import "github.com/docker/docker/pkg/term"
-
-import (
-	"github.com/moby/term"
-)
-
-// EscapeError is special error which returned by a TTY proxy reader's Read()
-// method in case its detach escape sequence is read.
-// Deprecated: use github.com/moby/term.EscapeError
-type EscapeError = term.EscapeError
-
-// State represents the state of the terminal.
-// Deprecated: use github.com/moby/term.State
-type State = term.State
-
-// Winsize represents the size of the terminal window.
-// Deprecated: use github.com/moby/term.Winsize
-type Winsize = term.Winsize
-
-var (
-	// ASCII list the possible supported ASCII key sequence
-	ASCII = term.ASCII
-
-	// ToBytes converts a string representing a suite of key-sequence to the corresponding ASCII code.
-	// Deprecated: use github.com/moby/term.ToBytes
-	ToBytes = term.ToBytes
-
-	// StdStreams returns the standard streams (stdin, stdout, stderr).
-	// Deprecated: use github.com/moby/term.StdStreams
-	StdStreams = term.StdStreams
-
-	// GetFdInfo returns the file descriptor for an os.File and indicates whether the file represents a terminal.
-	// Deprecated: use github.com/moby/term.GetFdInfo
-	GetFdInfo = term.GetFdInfo
-
-	// GetWinsize returns the window size based on the specified file descriptor.
-	// Deprecated: use github.com/moby/term.GetWinsize
-	GetWinsize = term.GetWinsize
-
-	// IsTerminal returns true if the given file descriptor is a terminal.
-	// Deprecated: use github.com/moby/term.IsTerminal
-	IsTerminal = term.IsTerminal
-
-	// RestoreTerminal restores the terminal connected to the given file descriptor
-	// to a previous state.
-	// Deprecated: use github.com/moby/term.RestoreTerminal
-	RestoreTerminal = term.RestoreTerminal
-
-	// SaveState saves the state of the terminal connected to the given file descriptor.
-	// Deprecated: use github.com/moby/term.SaveState
-	SaveState = term.SaveState
-
-	// DisableEcho applies the specified state to the terminal connected to the file
-	// descriptor, with echo disabled.
-	// Deprecated: use github.com/moby/term.DisableEcho
-	DisableEcho = term.DisableEcho
-
-	// SetRawTerminal puts the terminal connected to the given file descriptor into
-	// raw mode and returns the previous state. On UNIX, this puts both the input
-	// and output into raw mode. On Windows, it only puts the input into raw mode.
-	// Deprecated: use github.com/moby/term.SetRawTerminal
-	SetRawTerminal = term.SetRawTerminal
-
-	// SetRawTerminalOutput puts the output of terminal connected to the given file
-	// descriptor into raw mode. On UNIX, this does nothing and returns nil for the
-	// state. On Windows, it disables LF -> CRLF translation.
-	// Deprecated: use github.com/moby/term.SetRawTerminalOutput
-	SetRawTerminalOutput = term.SetRawTerminalOutput
-
-	// MakeRaw puts the terminal connected to the given file descriptor into raw
-	// mode and returns the previous state of the terminal so that it can be restored.
-	// Deprecated: use github.com/moby/term.MakeRaw
-	MakeRaw = term.MakeRaw
-
-	// NewEscapeProxy returns a new TTY proxy reader which wraps the given reader
-	// and detects when the specified escape keys are read, in which case the Read
-	// method will return an error of type EscapeError.
-	// Deprecated: use github.com/moby/term.NewEscapeProxy
-	NewEscapeProxy = term.NewEscapeProxy
-)

+ 0 - 21
pkg/term/deprecated_unix.go

@@ -1,21 +0,0 @@
-//go:build !windows
-// +build !windows
-
-package term // import "github.com/docker/docker/pkg/term"
-
-import (
-	"github.com/moby/term"
-)
-
-// Termios is the Unix API for terminal I/O.
-// Deprecated: use github.com/moby/term.Termios
-type Termios = term.Termios
-
-var (
-	// ErrInvalidState is returned if the state of the terminal is invalid.
-	ErrInvalidState = term.ErrInvalidState
-
-	// SetWinsize tries to set the specified window size for the specified file descriptor.
-	// Deprecated: use github.com/moby/term.GetWinsize
-	SetWinsize = term.SetWinsize
-)

+ 0 - 35
pkg/term/windows/deprecated.go

@@ -1,35 +0,0 @@
-//go:build windows
-// +build windows
-
-// Package windowsconsole implements ANSI-aware input and output streams for use
-// by the Docker Windows client. When asked for the set of standard streams (e.g.,
-// stdin, stdout, stderr), the code will create and return pseudo-streams that
-// convert ANSI sequences to / from Windows Console API calls.
-//
-// Deprecated: use github.com/moby/term/windows instead
-package windowsconsole // import "github.com/docker/docker/pkg/term/windows"
-
-import (
-	windowsconsole "github.com/moby/term/windows"
-)
-
-var (
-	// GetHandleInfo returns file descriptor and bool indicating whether the file is a console.
-	// Deprecated: use github.com/moby/term/windows.GetHandleInfo
-	GetHandleInfo = windowsconsole.GetHandleInfo
-
-	// IsConsole returns true if the given file descriptor is a Windows Console.
-	// The code assumes that GetConsoleMode will return an error for file descriptors that are not a console.
-	// Deprecated: use github.com/moby/term/windows.IsConsole
-	IsConsole = windowsconsole.IsConsole
-
-	// NewAnsiReader returns an io.ReadCloser that provides VT100 terminal emulation on top of a
-	// Windows console input handle.
-	// Deprecated: use github.com/moby/term/windows.NewAnsiReader
-	NewAnsiReader = windowsconsole.NewAnsiReader
-
-	// NewAnsiWriter returns an io.Writer that provides VT100 terminal emulation on top of a
-	// Windows console output handle.
-	// Deprecated: use github.com/moby/term/windows.NewAnsiWriter
-	NewAnsiWriter = windowsconsole.NewAnsiWriter
-)

+ 0 - 3
pkg/term/windows/windows_test.go

@@ -1,3 +0,0 @@
-// This file is necessary to pass the Docker tests.
-
-package windowsconsole // import "github.com/docker/docker/pkg/term/windows"