summaryrefslogtreecommitdiff
path: root/vendor/github.com/juju/ansiterm/attribute.go
diff options
context:
space:
mode:
authordependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>2021-11-22 17:01:27 +0000
committerGitHub <noreply@github.com>2021-11-22 17:01:27 +0000
commit73e95d1c3eea36ec5e294115a7aa4c9fd16445fd (patch)
treeeef0df38160cea16c30fa2ed66caeffcb3467442 /vendor/github.com/juju/ansiterm/attribute.go
parentbfc929efc44cc9255406ed6c2abec1b8a4f36dab (diff)
downloadpodman-73e95d1c3eea36ec5e294115a7aa4c9fd16445fd.tar.gz
podman-73e95d1c3eea36ec5e294115a7aa4c9fd16445fd.tar.bz2
podman-73e95d1c3eea36ec5e294115a7aa4c9fd16445fd.zip
Bump github.com/containers/image/v5 from 5.16.1 to 5.17.0
Bumps [github.com/containers/image/v5](https://github.com/containers/image) from 5.16.1 to 5.17.0. - [Release notes](https://github.com/containers/image/releases) - [Commits](https://github.com/containers/image/compare/v5.16.1...v5.17.0) --- updated-dependencies: - dependency-name: github.com/containers/image/v5 dependency-type: direct:production update-type: version-update:semver-minor ... Signed-off-by: dependabot[bot] <support@github.com>
Diffstat (limited to 'vendor/github.com/juju/ansiterm/attribute.go')
-rw-r--r--vendor/github.com/juju/ansiterm/attribute.go50
1 files changed, 0 insertions, 50 deletions
diff --git a/vendor/github.com/juju/ansiterm/attribute.go b/vendor/github.com/juju/ansiterm/attribute.go
deleted file mode 100644
index f2daa4813..000000000
--- a/vendor/github.com/juju/ansiterm/attribute.go
+++ /dev/null
@@ -1,50 +0,0 @@
-// Copyright 2016 Canonical Ltd.
-// Licensed under the LGPLv3, see LICENCE file for details.
-
-package ansiterm
-
-import (
- "fmt"
- "sort"
- "strings"
-)
-
-type attribute int
-
-const (
- unknownAttribute attribute = -1
- reset attribute = 0
-)
-
-// sgr returns the escape sequence for the Select Graphic Rendition
-// for the attribute.
-func (a attribute) sgr() string {
- if a < 0 {
- return ""
- }
- return fmt.Sprintf("\x1b[%dm", a)
-}
-
-type attributes []attribute
-
-func (a attributes) Len() int { return len(a) }
-func (a attributes) Less(i, j int) bool { return a[i] < a[j] }
-func (a attributes) Swap(i, j int) { a[i], a[j] = a[j], a[i] }
-
-// sgr returns the combined escape sequence for the Select Graphic Rendition
-// for the sequence of attributes.
-func (a attributes) sgr() string {
- switch len(a) {
- case 0:
- return ""
- case 1:
- return a[0].sgr()
- default:
- sort.Sort(a)
- var values []string
- for _, attr := range a {
- values = append(values, fmt.Sprint(attr))
- }
- return fmt.Sprintf("\x1b[%sm", strings.Join(values, ";"))
- }
-}