mirror of
https://github.com/containers/podman.git
synced 2025-06-24 11:28:24 +08:00
Merge pull request #13146 from cevich/dependabot_goterm
Bump github.com/buger/goterm from 1.0.1 to 1.0.4
This commit is contained in:
2
go.mod
2
go.mod
@ -5,7 +5,7 @@ go 1.16
|
|||||||
require (
|
require (
|
||||||
github.com/BurntSushi/toml v1.0.0
|
github.com/BurntSushi/toml v1.0.0
|
||||||
github.com/blang/semver v3.5.1+incompatible
|
github.com/blang/semver v3.5.1+incompatible
|
||||||
github.com/buger/goterm v1.0.1
|
github.com/buger/goterm v1.0.4
|
||||||
github.com/checkpoint-restore/checkpointctl v0.0.0-20211204171957-54b4ebfdb681
|
github.com/checkpoint-restore/checkpointctl v0.0.0-20211204171957-54b4ebfdb681
|
||||||
github.com/checkpoint-restore/go-criu/v5 v5.3.0
|
github.com/checkpoint-restore/go-criu/v5 v5.3.0
|
||||||
github.com/container-orchestrated-devices/container-device-interface v0.0.0-20220111162300-46367ec063fd
|
github.com/container-orchestrated-devices/container-device-interface v0.0.0-20220111162300-46367ec063fd
|
||||||
|
4
go.sum
4
go.sum
@ -175,8 +175,8 @@ github.com/bmizerany/assert v0.0.0-20160611221934-b7ed37b82869/go.mod h1:Ekp36dR
|
|||||||
github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc=
|
github.com/bombsimon/wsl/v3 v3.3.0/go.mod h1:st10JtZYLE4D5sC7b8xV4zTKZwAQjCH/Hy2Pm1FNZIc=
|
||||||
github.com/breml/bidichk v0.1.1/go.mod h1:zbfeitpevDUGI7V91Uzzuwrn4Vls8MoBMrwtt78jmso=
|
github.com/breml/bidichk v0.1.1/go.mod h1:zbfeitpevDUGI7V91Uzzuwrn4Vls8MoBMrwtt78jmso=
|
||||||
github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
|
github.com/bshuster-repo/logrus-logstash-hook v0.4.1/go.mod h1:zsTqEiSzDgAa/8GZR7E1qaXrhYNDKBYy5/dWPTIflbk=
|
||||||
github.com/buger/goterm v1.0.1 h1:kSgw3jcjYUzC0Uh/eG8ULjccuz353solup27lUH8Zug=
|
github.com/buger/goterm v1.0.4 h1:Z9YvGmOih81P0FbVtEYTFF6YsSgxSUKEhf/f9bTMXbY=
|
||||||
github.com/buger/goterm v1.0.1/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE=
|
github.com/buger/goterm v1.0.4/go.mod h1:HiFWV3xnkolgrBV3mY8m0X0Pumt4zg4QhbdOzQtB8tE=
|
||||||
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
github.com/buger/jsonparser v0.0.0-20180808090653-f4dd9f5a6b44/go.mod h1:bbYlZJ7hK1yFx9hf58LP0zeX7UjIGs20ufpu3evjr+s=
|
||||||
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
github.com/buger/jsonparser v1.1.1/go.mod h1:6RYKKt7H4d4+iWqouImQ9R2FZql3VbhNgx27UK13J/0=
|
||||||
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
|
github.com/bugsnag/bugsnag-go v0.0.0-20141110184014-b1d153021fcd/go.mod h1:2oa8nejYd4cQ/b0hMIopN0lCRxU0bueqREvZLWFrtK8=
|
||||||
|
1
vendor/github.com/buger/goterm/.gitignore
generated
vendored
1
vendor/github.com/buger/goterm/.gitignore
generated
vendored
@ -1 +1,2 @@
|
|||||||
*.swp
|
*.swp
|
||||||
|
.idea
|
9
vendor/github.com/buger/goterm/terminal.go
generated
vendored
9
vendor/github.com/buger/goterm/terminal.go
generated
vendored
@ -199,15 +199,6 @@ func Width() int {
|
|||||||
return int(ws.Col)
|
return int(ws.Col)
|
||||||
}
|
}
|
||||||
|
|
||||||
// Height gets console height
|
|
||||||
func Height() int {
|
|
||||||
ws, err := getWinsize()
|
|
||||||
if err != nil {
|
|
||||||
return -1
|
|
||||||
}
|
|
||||||
return int(ws.Row)
|
|
||||||
}
|
|
||||||
|
|
||||||
// CurrentHeight gets current height. Line count in Screen buffer.
|
// CurrentHeight gets current height. Line count in Screen buffer.
|
||||||
func CurrentHeight() int {
|
func CurrentHeight() int {
|
||||||
return strings.Count(Screen.String(), "\n")
|
return strings.Count(Screen.String(), "\n")
|
||||||
|
10
vendor/github.com/buger/goterm/terminal_nosysioctl.go
generated
vendored
10
vendor/github.com/buger/goterm/terminal_nosysioctl.go
generated
vendored
@ -1,3 +1,4 @@
|
|||||||
|
//go:build plan9 || solaris
|
||||||
// +build plan9 solaris
|
// +build plan9 solaris
|
||||||
|
|
||||||
package goterm
|
package goterm
|
||||||
@ -10,3 +11,12 @@ func getWinsize() (*winsize, error) {
|
|||||||
|
|
||||||
return ws, nil
|
return ws, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Height gets console height
|
||||||
|
func Height() int {
|
||||||
|
ws, err := getWinsize()
|
||||||
|
if err != nil {
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
return int(ws.Row)
|
||||||
|
}
|
||||||
|
17
vendor/github.com/buger/goterm/terminal_sysioctl.go
generated
vendored
17
vendor/github.com/buger/goterm/terminal_sysioctl.go
generated
vendored
@ -1,8 +1,11 @@
|
|||||||
|
//go:build !windows && !plan9 && !solaris
|
||||||
// +build !windows,!plan9,!solaris
|
// +build !windows,!plan9,!solaris
|
||||||
|
|
||||||
package goterm
|
package goterm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/unix"
|
"golang.org/x/sys/unix"
|
||||||
@ -17,3 +20,17 @@ func getWinsize() (*unix.Winsize, error) {
|
|||||||
|
|
||||||
return ws, nil
|
return ws, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Height gets console height
|
||||||
|
func Height() int {
|
||||||
|
ws, err := getWinsize()
|
||||||
|
if err != nil {
|
||||||
|
// returns math.MinInt32 if we could not retrieve the height of console window,
|
||||||
|
// like VSCode debugging console
|
||||||
|
if errors.Is(err, unix.EOPNOTSUPP) {
|
||||||
|
return math.MinInt32
|
||||||
|
}
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
return int(ws.Row)
|
||||||
|
}
|
||||||
|
17
vendor/github.com/buger/goterm/terminal_windows.go
generated
vendored
17
vendor/github.com/buger/goterm/terminal_windows.go
generated
vendored
@ -1,8 +1,11 @@
|
|||||||
|
//go:build windows
|
||||||
// +build windows
|
// +build windows
|
||||||
|
|
||||||
package goterm
|
package goterm
|
||||||
|
|
||||||
import (
|
import (
|
||||||
|
"errors"
|
||||||
|
"math"
|
||||||
"os"
|
"os"
|
||||||
|
|
||||||
"golang.org/x/sys/windows"
|
"golang.org/x/sys/windows"
|
||||||
@ -21,3 +24,17 @@ func getWinsize() (*winsize, error) {
|
|||||||
|
|
||||||
return ws, nil
|
return ws, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// Height gets console height
|
||||||
|
func Height() int {
|
||||||
|
ws, err := getWinsize()
|
||||||
|
if err != nil {
|
||||||
|
// returns math.MinInt32 if we could not retrieve the height of console window,
|
||||||
|
// like VSCode debugging console
|
||||||
|
if errors.Is(err, windows.WSAEOPNOTSUPP) {
|
||||||
|
return math.MinInt32
|
||||||
|
}
|
||||||
|
return -1
|
||||||
|
}
|
||||||
|
return int(ws.Row)
|
||||||
|
}
|
||||||
|
2
vendor/modules.txt
vendored
2
vendor/modules.txt
vendored
@ -41,7 +41,7 @@ github.com/beorn7/perks/quantile
|
|||||||
# github.com/blang/semver v3.5.1+incompatible
|
# github.com/blang/semver v3.5.1+incompatible
|
||||||
## explicit
|
## explicit
|
||||||
github.com/blang/semver
|
github.com/blang/semver
|
||||||
# github.com/buger/goterm v1.0.1
|
# github.com/buger/goterm v1.0.4
|
||||||
## explicit
|
## explicit
|
||||||
github.com/buger/goterm
|
github.com/buger/goterm
|
||||||
# github.com/cespare/xxhash/v2 v2.1.2
|
# github.com/cespare/xxhash/v2 v2.1.2
|
||||||
|
Reference in New Issue
Block a user