mirror of
https://github.com/containers/podman.git
synced 2025-12-05 21:32:22 +08:00
update buildah and c/common to latest
also includes bumps for c/storage and c/image Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
2
vendor/github.com/chzyer/readline/README.md
generated
vendored
2
vendor/github.com/chzyer/readline/README.md
generated
vendored
@@ -11,7 +11,7 @@
|
||||
<img src="https://raw.githubusercontent.com/chzyer/readline/assets/logo_f.png" />
|
||||
</p>
|
||||
|
||||
A powerful readline library in `Linux` `macOS` `Windows` `Solaris`
|
||||
A powerful readline library in `Linux` `macOS` `Windows` `Solaris` `AIX`
|
||||
|
||||
## Guide
|
||||
|
||||
|
||||
10
vendor/github.com/chzyer/readline/go.mod
generated
vendored
Normal file
10
vendor/github.com/chzyer/readline/go.mod
generated
vendored
Normal file
@@ -0,0 +1,10 @@
|
||||
module github.com/chzyer/readline
|
||||
|
||||
go 1.15
|
||||
|
||||
require (
|
||||
github.com/chzyer/test v1.0.0
|
||||
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5
|
||||
)
|
||||
|
||||
require github.com/chzyer/logex v1.2.1
|
||||
6
vendor/github.com/chzyer/readline/go.sum
generated
vendored
Normal file
6
vendor/github.com/chzyer/readline/go.sum
generated
vendored
Normal file
@@ -0,0 +1,6 @@
|
||||
github.com/chzyer/logex v1.2.1 h1:XHDu3E6q+gdHgsdTPH6ImJMIp436vR6MPtH8gP05QzM=
|
||||
github.com/chzyer/logex v1.2.1/go.mod h1:JLbx6lG2kDbNRFnfkgvh4eRJRPX1QCoOIWomwysCBrQ=
|
||||
github.com/chzyer/test v1.0.0 h1:p3BQDXSxOhOG0P9z6/hGnII4LGiEPOYBhs8asl/fC04=
|
||||
github.com/chzyer/test v1.0.0/go.mod h1:2JlltgoNkt4TW/z9V/IzDdFaMTM2JPIi26O1pF38GC8=
|
||||
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5 h1:y/woIyUBFbpQGKS0u1aHF/40WUDnek3fPOyD08H5Vng=
|
||||
golang.org/x/sys v0.0.0-20220310020820-b874c991c1a5/go.mod h1:oPkhp1MJrh7nUepCBck5+mAzfO9JrbApNNgaTdGDITg=
|
||||
6
vendor/github.com/chzyer/readline/operation.go
generated
vendored
6
vendor/github.com/chzyer/readline/operation.go
generated
vendored
@@ -109,10 +109,12 @@ func (o *Operation) ioloop() {
|
||||
keepInSearchMode := false
|
||||
keepInCompleteMode := false
|
||||
r := o.t.ReadRune()
|
||||
|
||||
if o.GetConfig().FuncFilterInputRune != nil {
|
||||
var process bool
|
||||
r, process = o.GetConfig().FuncFilterInputRune(r)
|
||||
if !process {
|
||||
o.t.KickRead()
|
||||
o.buf.Refresh(nil) // to refresh the line
|
||||
continue // ignore this rune
|
||||
}
|
||||
@@ -434,6 +436,10 @@ func (o *Operation) Slice() ([]byte, error) {
|
||||
}
|
||||
|
||||
func (o *Operation) Close() {
|
||||
select {
|
||||
case o.errchan <- io.EOF:
|
||||
default:
|
||||
}
|
||||
o.history.Close()
|
||||
}
|
||||
|
||||
|
||||
18
vendor/github.com/chzyer/readline/readline.go
generated
vendored
18
vendor/github.com/chzyer/readline/readline.go
generated
vendored
@@ -17,7 +17,9 @@
|
||||
//
|
||||
package readline
|
||||
|
||||
import "io"
|
||||
import (
|
||||
"io"
|
||||
)
|
||||
|
||||
type Instance struct {
|
||||
Config *Config
|
||||
@@ -270,14 +272,24 @@ func (i *Instance) ReadSlice() ([]byte, error) {
|
||||
}
|
||||
|
||||
// we must make sure that call Close() before process exit.
|
||||
// if there has a pending reading operation, that reading will be interrupted.
|
||||
// so you can capture the signal and call Instance.Close(), it's thread-safe.
|
||||
func (i *Instance) Close() error {
|
||||
i.Config.Stdin.Close()
|
||||
i.Operation.Close()
|
||||
if err := i.Terminal.Close(); err != nil {
|
||||
return err
|
||||
}
|
||||
i.Config.Stdin.Close()
|
||||
i.Operation.Close()
|
||||
return nil
|
||||
}
|
||||
|
||||
// call CaptureExitSignal when you want readline exit gracefully.
|
||||
func (i *Instance) CaptureExitSignal() {
|
||||
CaptureExitSignal(func() {
|
||||
i.Close()
|
||||
})
|
||||
}
|
||||
|
||||
func (i *Instance) Clean() {
|
||||
i.Operation.Clean()
|
||||
}
|
||||
|
||||
6
vendor/github.com/chzyer/readline/runebuf.go
generated
vendored
6
vendor/github.com/chzyer/readline/runebuf.go
generated
vendored
@@ -35,7 +35,7 @@ type RuneBuffer struct {
|
||||
sync.Mutex
|
||||
}
|
||||
|
||||
func (r* RuneBuffer) pushKill(text []rune) {
|
||||
func (r *RuneBuffer) pushKill(text []rune) {
|
||||
r.lastKill = append([]rune{}, text...)
|
||||
}
|
||||
|
||||
@@ -221,7 +221,7 @@ func (r *RuneBuffer) DeleteWord() {
|
||||
}
|
||||
for i := init + 1; i < len(r.buf); i++ {
|
||||
if !IsWordBreak(r.buf[i]) && IsWordBreak(r.buf[i-1]) {
|
||||
r.pushKill(r.buf[r.idx:i-1])
|
||||
r.pushKill(r.buf[r.idx : i-1])
|
||||
r.Refresh(func() {
|
||||
r.buf = append(r.buf[:r.idx], r.buf[i-1:]...)
|
||||
})
|
||||
@@ -350,7 +350,7 @@ func (r *RuneBuffer) Yank() {
|
||||
return
|
||||
}
|
||||
r.Refresh(func() {
|
||||
buf := make([]rune, 0, len(r.buf) + len(r.lastKill))
|
||||
buf := make([]rune, 0, len(r.buf)+len(r.lastKill))
|
||||
buf = append(buf, r.buf[:r.idx]...)
|
||||
buf = append(buf, r.lastKill...)
|
||||
buf = append(buf, r.buf[r.idx:]...)
|
||||
|
||||
2
vendor/github.com/chzyer/readline/term.go
generated
vendored
2
vendor/github.com/chzyer/readline/term.go
generated
vendored
@@ -2,7 +2,7 @@
|
||||
// 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 solaris
|
||||
// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd os400 solaris
|
||||
|
||||
// Package terminal provides support functions for dealing with terminals, as
|
||||
// commonly found on UNIX systems.
|
||||
|
||||
@@ -2,7 +2,7 @@
|
||||
// Use of this source code is governed by a BSD-style
|
||||
// license that can be found in the LICENSE file.
|
||||
|
||||
// +build solaris
|
||||
// +build aix os400 solaris
|
||||
|
||||
package readline
|
||||
|
||||
16
vendor/github.com/chzyer/readline/terminal.go
generated
vendored
16
vendor/github.com/chzyer/readline/terminal.go
generated
vendored
@@ -125,6 +125,7 @@ func (t *Terminal) ioloop() {
|
||||
var (
|
||||
isEscape bool
|
||||
isEscapeEx bool
|
||||
isEscapeSS3 bool
|
||||
expectNextChar bool
|
||||
)
|
||||
|
||||
@@ -152,9 +153,15 @@ func (t *Terminal) ioloop() {
|
||||
if isEscape {
|
||||
isEscape = false
|
||||
if r == CharEscapeEx {
|
||||
// ^][
|
||||
expectNextChar = true
|
||||
isEscapeEx = true
|
||||
continue
|
||||
} else if r == CharO {
|
||||
// ^]O
|
||||
expectNextChar = true
|
||||
isEscapeSS3 = true
|
||||
continue
|
||||
}
|
||||
r = escapeKey(r, buf)
|
||||
} else if isEscapeEx {
|
||||
@@ -177,6 +184,15 @@ func (t *Terminal) ioloop() {
|
||||
expectNextChar = true
|
||||
continue
|
||||
}
|
||||
} else if isEscapeSS3 {
|
||||
isEscapeSS3 = false
|
||||
if key := readEscKey(r, buf); key != nil {
|
||||
r = escapeSS3Key(key)
|
||||
}
|
||||
if r == 0 {
|
||||
expectNextChar = true
|
||||
continue
|
||||
}
|
||||
}
|
||||
|
||||
expectNextChar = true
|
||||
|
||||
34
vendor/github.com/chzyer/readline/utils.go
generated
vendored
34
vendor/github.com/chzyer/readline/utils.go
generated
vendored
@@ -6,9 +6,11 @@ import (
|
||||
"container/list"
|
||||
"fmt"
|
||||
"os"
|
||||
"os/signal"
|
||||
"strconv"
|
||||
"strings"
|
||||
"sync"
|
||||
"syscall"
|
||||
"time"
|
||||
"unicode"
|
||||
)
|
||||
@@ -41,6 +43,7 @@ const (
|
||||
CharCtrlY = 25
|
||||
CharCtrlZ = 26
|
||||
CharEsc = 27
|
||||
CharO = 79
|
||||
CharEscapeEx = 91
|
||||
CharBackspace = 127
|
||||
)
|
||||
@@ -121,6 +124,27 @@ func escapeExKey(key *escapeKeyPair) rune {
|
||||
return r
|
||||
}
|
||||
|
||||
// translate EscOX SS3 codes for up/down/etc.
|
||||
func escapeSS3Key(key *escapeKeyPair) rune {
|
||||
var r rune
|
||||
switch key.typ {
|
||||
case 'D':
|
||||
r = CharBackward
|
||||
case 'C':
|
||||
r = CharForward
|
||||
case 'A':
|
||||
r = CharPrev
|
||||
case 'B':
|
||||
r = CharNext
|
||||
case 'H':
|
||||
r = CharLineStart
|
||||
case 'F':
|
||||
r = CharLineEnd
|
||||
default:
|
||||
}
|
||||
return r
|
||||
}
|
||||
|
||||
type escapeKeyPair struct {
|
||||
attr string
|
||||
typ rune
|
||||
@@ -275,3 +299,13 @@ func Debug(o ...interface{}) {
|
||||
fmt.Fprintln(f, o...)
|
||||
f.Close()
|
||||
}
|
||||
|
||||
func CaptureExitSignal(f func()) {
|
||||
cSignal := make(chan os.Signal, 1)
|
||||
signal.Notify(cSignal, os.Interrupt, syscall.SIGTERM)
|
||||
go func() {
|
||||
for range cSignal {
|
||||
f()
|
||||
}
|
||||
}()
|
||||
}
|
||||
|
||||
2
vendor/github.com/chzyer/readline/utils_unix.go
generated
vendored
2
vendor/github.com/chzyer/readline/utils_unix.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// +build darwin dragonfly freebsd linux,!appengine netbsd openbsd solaris
|
||||
// +build aix darwin dragonfly freebsd linux,!appengine netbsd openbsd os400 solaris
|
||||
|
||||
package readline
|
||||
|
||||
|
||||
Reference in New Issue
Block a user