podman/vendor/github.com/moby/term
flouthoc a55e2a00fc rootfs: Add support for rootfs-overlay and bump to buildah v1.22.1-0.202108
Allows users to specify a readonly rootfs with :O, in exchange podman will create a writable overlay.

bump builah to v1.22.1-0.20210823173221-da2b428c56ce

[NO TESTS NEEDED]

Signed-off-by: flouthoc <flouthoc.git@gmail.com>
2021-09-14 13:31:39 +05:30
..
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
go.mod rootfs: Add support for rootfs-overlay and bump to buildah v1.22.1-0.202108 2021-09-14 13:31:39 +05:30
go.sum rootfs: Add support for rootfs-overlay and bump to buildah v1.22.1-0.202108 2021-09-14 13:31:39 +05:30
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.