mirror of
https://github.com/containers/podman.git
synced 2025-12-16 20:47:47 +08:00
upgrade all dependencies
The dependabot does not update dependencies when they do not use a tag. This patch upgrades all untagged depenencies if possible. You can upgrade all dependencies with `go get -u ./... && make vendor` in theory however this failed since the k8s changes do not compile on go v1.16 so I only updated the other dependencies. Signed-off-by: Paul Holzinger <pholzing@redhat.com>
This commit is contained in:
1
vendor/github.com/buger/goterm/.gitignore
generated
vendored
Normal file
1
vendor/github.com/buger/goterm/.gitignore
generated
vendored
Normal file
@@ -0,0 +1 @@
|
||||
*.swp
|
||||
66
vendor/github.com/buger/goterm/box.go
generated
vendored
66
vendor/github.com/buger/goterm/box.go
generated
vendored
@@ -2,7 +2,9 @@ package goterm
|
||||
|
||||
import (
|
||||
"bytes"
|
||||
"regexp"
|
||||
"strings"
|
||||
_ "unicode/utf8"
|
||||
)
|
||||
|
||||
const DEFAULT_BORDER = "- │ ┌ ┐ └ ┘"
|
||||
@@ -61,7 +63,9 @@ func (b *Box) Write(p []byte) (int, error) {
|
||||
return b.Buf.Write(p)
|
||||
}
|
||||
|
||||
// Render Box
|
||||
var ANSI_RE = regexp.MustCompile(`\\0\d+\[\d+(?:;\d+)?m`)
|
||||
|
||||
// String renders Box
|
||||
func (b *Box) String() (out string) {
|
||||
borders := strings.Split(b.Border, " ")
|
||||
lines := strings.Split(b.Buf.String(), "\n")
|
||||
@@ -74,7 +78,6 @@ func (b *Box) String() (out string) {
|
||||
|
||||
// Content width without borders and padding
|
||||
contentWidth := b.Width - (b.PaddingX+1)*2
|
||||
|
||||
for y := 0; y < b.Height; y++ {
|
||||
var line string
|
||||
|
||||
@@ -99,12 +102,63 @@ func (b *Box) String() (out string) {
|
||||
line = ""
|
||||
}
|
||||
|
||||
if len(line) > contentWidth-1 {
|
||||
r := []rune(line)
|
||||
|
||||
lastAnsii := ""
|
||||
withoutAnsii := []rune{}
|
||||
withOffset := []rune{}
|
||||
i := 0
|
||||
|
||||
for {
|
||||
if i >= len(r) {
|
||||
break
|
||||
}
|
||||
|
||||
if r[i] == 27 {
|
||||
lastAnsii = ""
|
||||
withOffset = append(withOffset, r[i])
|
||||
lastAnsii += string(r[i])
|
||||
i++
|
||||
for {
|
||||
|
||||
i++
|
||||
if i > len(r) {
|
||||
break
|
||||
}
|
||||
|
||||
withOffset = append(withOffset, r[i])
|
||||
lastAnsii += string(r[i])
|
||||
|
||||
if r[i] == 'm' {
|
||||
i++
|
||||
break
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
if i >= len(r) {
|
||||
break
|
||||
}
|
||||
|
||||
withoutAnsii = append(withoutAnsii, r[i])
|
||||
|
||||
if len(withoutAnsii) <= contentWidth {
|
||||
withOffset = append(withOffset, r[i])
|
||||
}
|
||||
|
||||
i++
|
||||
}
|
||||
|
||||
if len(withoutAnsii) > contentWidth {
|
||||
// If line is too large limit it
|
||||
line = line[0:contentWidth]
|
||||
line = string(withOffset)
|
||||
} else {
|
||||
// If line is too small enlarge it by adding spaces
|
||||
line = line + strings.Repeat(" ", contentWidth-len(line))
|
||||
line += strings.Repeat(" ", contentWidth-len(withoutAnsii))
|
||||
}
|
||||
|
||||
if lastAnsii != "" {
|
||||
line += RESET
|
||||
}
|
||||
|
||||
line = prefix + line + suffix
|
||||
@@ -112,7 +166,7 @@ func (b *Box) String() (out string) {
|
||||
|
||||
// Don't add newline for last element
|
||||
if y != b.Height-1 {
|
||||
line = line + "\n"
|
||||
line += "\n"
|
||||
}
|
||||
|
||||
out += line
|
||||
|
||||
5
vendor/github.com/buger/goterm/go.mod
generated
vendored
Normal file
5
vendor/github.com/buger/goterm/go.mod
generated
vendored
Normal file
@@ -0,0 +1,5 @@
|
||||
module github.com/buger/goterm
|
||||
|
||||
go 1.15
|
||||
|
||||
require golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54
|
||||
2
vendor/github.com/buger/goterm/go.sum
generated
vendored
Normal file
2
vendor/github.com/buger/goterm/go.sum
generated
vendored
Normal file
@@ -0,0 +1,2 @@
|
||||
golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54 h1:rF3Ohx8DRyl8h2zw9qojyLHLhrJpEMgyPOImREEryf0=
|
||||
golang.org/x/sys v0.0.0-20210331175145-43e1dd70ce54/go.mod h1:h1NjWce9XRLGQEsW7wpKNCjG9DtNlClVuFLEZdDNbEs=
|
||||
3
vendor/github.com/buger/goterm/plot.go
generated
vendored
3
vendor/github.com/buger/goterm/plot.go
generated
vendored
@@ -4,6 +4,7 @@ import (
|
||||
"fmt"
|
||||
"math"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
)
|
||||
|
||||
const (
|
||||
@@ -119,7 +120,7 @@ func (c *LineChart) DrawAxes(maxX, minX, maxY, minY float64, index int) {
|
||||
c.writeText(ff(minX), c.paddingX, 0)
|
||||
|
||||
x_col := c.data.columns[0]
|
||||
c.writeText(c.data.columns[0], c.Width/2-len(x_col)/2, 1)
|
||||
c.writeText(c.data.columns[0], c.Width/2-utf8.RuneCountInString(x_col)/2, 1)
|
||||
|
||||
if c.Flags&DRAW_INDEPENDENT != 0 || len(c.data.columns) < 3 {
|
||||
col := c.data.columns[index]
|
||||
|
||||
10
vendor/github.com/buger/goterm/terminal.go
generated
vendored
10
vendor/github.com/buger/goterm/terminal.go
generated
vendored
@@ -71,7 +71,7 @@ type winsize struct {
|
||||
// Its not recommended write to buffer dirrectly, use package Print,Printf,Println fucntions instead.
|
||||
var Screen *bytes.Buffer = new(bytes.Buffer)
|
||||
|
||||
// Get relative or absolute coordinates
|
||||
// GetXY gets relative or absolute coordinates
|
||||
// To get relative, set PCT flag to number:
|
||||
//
|
||||
// // Get 10% of total width to `x` and 20 to y
|
||||
@@ -145,7 +145,7 @@ func MoveTo(str string, x int, y int) (out string) {
|
||||
})
|
||||
}
|
||||
|
||||
// Return carrier to start of line
|
||||
// ResetLine returns carrier to start of line
|
||||
func ResetLine(str string) (out string) {
|
||||
return applyTransform(str, func(idx int, line string) string {
|
||||
return fmt.Sprintf("%s%s", RESET_LINE, line)
|
||||
@@ -188,7 +188,7 @@ func Background(str string, color int) string {
|
||||
})
|
||||
}
|
||||
|
||||
// Get console width
|
||||
// Width gets console width
|
||||
func Width() int {
|
||||
ws, err := getWinsize()
|
||||
|
||||
@@ -199,7 +199,7 @@ func Width() int {
|
||||
return int(ws.Col)
|
||||
}
|
||||
|
||||
// Get console height
|
||||
// Height gets console height
|
||||
func Height() int {
|
||||
ws, err := getWinsize()
|
||||
if err != nil {
|
||||
@@ -208,7 +208,7 @@ func Height() int {
|
||||
return int(ws.Row)
|
||||
}
|
||||
|
||||
// Get current height. Line count in Screen buffer.
|
||||
// CurrentHeight gets current height. Line count in Screen buffer.
|
||||
func CurrentHeight() int {
|
||||
return strings.Count(Screen.String(), "\n")
|
||||
}
|
||||
|
||||
2
vendor/github.com/buger/goterm/terminal_nosysioctl.go
generated
vendored
2
vendor/github.com/buger/goterm/terminal_nosysioctl.go
generated
vendored
@@ -1,4 +1,4 @@
|
||||
// +build windows plan9 solaris
|
||||
// +build plan9 solaris
|
||||
|
||||
package goterm
|
||||
|
||||
|
||||
1
vendor/github.com/buger/goterm/terminal_sysioctl.go
generated
vendored
1
vendor/github.com/buger/goterm/terminal_sysioctl.go
generated
vendored
@@ -4,6 +4,7 @@ package goterm
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/unix"
|
||||
)
|
||||
|
||||
|
||||
23
vendor/github.com/buger/goterm/terminal_windows.go
generated
vendored
Normal file
23
vendor/github.com/buger/goterm/terminal_windows.go
generated
vendored
Normal file
@@ -0,0 +1,23 @@
|
||||
// +build windows
|
||||
|
||||
package goterm
|
||||
|
||||
import (
|
||||
"os"
|
||||
|
||||
"golang.org/x/sys/windows"
|
||||
)
|
||||
|
||||
func getWinsize() (*winsize, error) {
|
||||
ws := new(winsize)
|
||||
fd := os.Stdout.Fd()
|
||||
var info windows.ConsoleScreenBufferInfo
|
||||
if err := windows.GetConsoleScreenBufferInfo(windows.Handle(fd), &info); err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
ws.Col = uint16(info.Window.Right - info.Window.Left + 1)
|
||||
ws.Row = uint16(info.Window.Bottom - info.Window.Top + 1)
|
||||
|
||||
return ws, nil
|
||||
}
|
||||
Reference in New Issue
Block a user