mirror of
https://github.com/opencontainers/runc.git
synced 2026-07-10 21:53:57 +08:00
*: fmt.Errorf: use %w when appropriate
This should result in no change when the error is printed, but make the errors returned unwrappable, meaning errors.As and errors.Is will work. Signed-off-by: Kir Kolyshkin <kolyshkin@gmail.com>
This commit is contained in:
@@ -136,7 +136,7 @@ func (t *tty) recvtty(process *libcontainer.Process, socket *os.File) (Err error
|
||||
|
||||
// Set raw mode for the controlling terminal.
|
||||
if err := t.hostConsole.SetRaw(); err != nil {
|
||||
return fmt.Errorf("failed to set the terminal from the stdin: %v", err)
|
||||
return fmt.Errorf("failed to set the terminal from the stdin: %w", err)
|
||||
}
|
||||
go handleInterrupt(t.hostConsole)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user