kaniko/vendor/github.com/moby/term
dependabot[bot] 5792a72413
chore(deps): bump github.com/google/go-containerregistry (#2508)
Bumps [github.com/google/go-containerregistry](https://github.com/google/go-containerregistry) from 0.14.0 to 0.15.1.
- [Release notes](https://github.com/google/go-containerregistry/releases)
- [Changelog](https://github.com/google/go-containerregistry/blob/main/.goreleaser.yml)
- [Commits](https://github.com/google/go-containerregistry/compare/v0.14.0...v0.15.1)

---
updated-dependencies:
- dependency-name: github.com/google/go-containerregistry
  dependency-type: direct:production
  update-type: version-update:semver-minor
...

Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
2023-05-16 00:42:29 -07:00
..
windows Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
.gitignore Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
LICENSE Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
README.md Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
ascii.go Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
proxy.go Bump github.com/docker/docker to latest release (#1866) 2022-01-14 15:58:32 -05:00
tc.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
term.go chore(deps): bump github.com/google/go-containerregistry (#2508) 2023-05-16 00:42:29 -07:00
term_windows.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
termios.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
termios_bsd.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
termios_nonbsd.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04:00
winsize.go Upgrade docker (#2440) 2023-03-23 20:34:25 -04: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.