podman/vendor/github.com/moby/term
dependabot[bot] 9457549fff build(deps): bump github.com/vbauerster/mpb/v7 from 7.5.2 to 7.5.3
Bumps [github.com/vbauerster/mpb/v7](https://github.com/vbauerster/mpb) from 7.5.2 to 7.5.3.
- [Release notes](https://github.com/vbauerster/mpb/releases)
- [Commits](https://github.com/vbauerster/mpb/compare/v7.5.2...v7.5.3)

---
updated-dependencies:
- dependency-name: github.com/vbauerster/mpb/v7
  dependency-type: direct:production
  update-type: version-update:semver-patch
...

Also bump the go module to 1.17 to be able to compile the new code.
Given containers/common and others already require go 1.17+ we're
safe to go.

Signed-off-by: dependabot[bot] <support@github.com>
Signed-off-by: Valentin Rothberg <vrothberg@redhat.com>
2022-09-13 08:58:22 +02:00
..
windows [NO TESTS NEEDED] Vendor in containers/buildah v1.20.0 2021-03-26 13:57:27 -04:00
.gitignore update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
LICENSE update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
README.md update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
ascii.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
proxy.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
tc.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
term.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
term_windows.go Bump to containers/buildah 1.9.2 2021-01-15 06:23:19 -05:00
termios.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
termios_bsd.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
termios_nonbsd.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00
winsize.go update github.com/docker/docker and relevant deps 2020-09-18 02:22:25 +09:00

README.md

term - utilities for dealing with terminals

Test GoDoc Go Report Card

term provides structures and helper functions to work with terminal (state, sizes).

Using term

package main

import (
	"log"
	"os"

	"github.com/moby/term"
)

func main() {
	fd := os.Stdin.Fd()
	if term.IsTerminal(fd) {
		ws, err := term.GetWinsize(fd)
		if err != nil {
			log.Fatalf("term.GetWinsize: %s", err)
		}
		log.Printf("%d:%d\n", ws.Height, ws.Width)
	}
}

Contributing

Want to hack on term? Docker's contributions guidelines apply.

Code and documentation copyright 2015 Docker, inc. Code released under the Apache 2.0 license. Docs released under Creative commons.