summaryrefslogtreecommitdiffstats
path: root/vendor/github.com/mattn/go-colorable
diff options
context:
space:
mode:
authorWim <wim@42.be>2021-12-12 00:05:15 +0100
committerGitHub <noreply@github.com>2021-12-12 00:05:15 +0100
commit3893a035be347a7687a41d2054dd1b274d3a0504 (patch)
treedfe4a3bf72a0a6356e51bd8fc2e88e9a26e52331 /vendor/github.com/mattn/go-colorable
parent658bdd9faa835660ae407331732e9d93d8f6443b (diff)
downloadmatterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.gz
matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.tar.bz2
matterbridge-msglm-3893a035be347a7687a41d2054dd1b274d3a0504.zip
Update dependencies/vendor (#1659)
Diffstat (limited to 'vendor/github.com/mattn/go-colorable')
-rw-r--r--vendor/github.com/mattn/go-colorable/.travis.yml15
-rw-r--r--vendor/github.com/mattn/go-colorable/README.md2
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_appengine.go1
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_others.go4
-rw-r--r--vendor/github.com/mattn/go-colorable/colorable_windows.go14
-rw-r--r--vendor/github.com/mattn/go-colorable/noncolorable.go10
6 files changed, 20 insertions, 26 deletions
diff --git a/vendor/github.com/mattn/go-colorable/.travis.yml b/vendor/github.com/mattn/go-colorable/.travis.yml
deleted file mode 100644
index 7942c565..00000000
--- a/vendor/github.com/mattn/go-colorable/.travis.yml
+++ /dev/null
@@ -1,15 +0,0 @@
-language: go
-sudo: false
-go:
- - 1.13.x
- - tip
-
-before_install:
- - go get -t -v ./...
-
-script:
- - ./go.test.sh
-
-after_success:
- - bash <(curl -s https://codecov.io/bash)
-
diff --git a/vendor/github.com/mattn/go-colorable/README.md b/vendor/github.com/mattn/go-colorable/README.md
index e055952b..ca048371 100644
--- a/vendor/github.com/mattn/go-colorable/README.md
+++ b/vendor/github.com/mattn/go-colorable/README.md
@@ -1,6 +1,6 @@
# go-colorable
-[![Build Status](https://travis-ci.org/mattn/go-colorable.svg?branch=master)](https://travis-ci.org/mattn/go-colorable)
+[![Build Status](https://github.com/mattn/go-colorable/workflows/test/badge.svg)](https://github.com/mattn/go-colorable/actions?query=workflow%3Atest)
[![Codecov](https://codecov.io/gh/mattn/go-colorable/branch/master/graph/badge.svg)](https://codecov.io/gh/mattn/go-colorable)
[![GoDoc](https://godoc.org/github.com/mattn/go-colorable?status.svg)](http://godoc.org/github.com/mattn/go-colorable)
[![Go Report Card](https://goreportcard.com/badge/mattn/go-colorable)](https://goreportcard.com/report/mattn/go-colorable)
diff --git a/vendor/github.com/mattn/go-colorable/colorable_appengine.go b/vendor/github.com/mattn/go-colorable/colorable_appengine.go
index 1f7806fe..416d1bbb 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_appengine.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_appengine.go
@@ -1,3 +1,4 @@
+//go:build appengine
// +build appengine
package colorable
diff --git a/vendor/github.com/mattn/go-colorable/colorable_others.go b/vendor/github.com/mattn/go-colorable/colorable_others.go
index 08cbd1e0..766d9460 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_others.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_others.go
@@ -1,5 +1,5 @@
-// +build !windows
-// +build !appengine
+//go:build !windows && !appengine
+// +build !windows,!appengine
package colorable
diff --git a/vendor/github.com/mattn/go-colorable/colorable_windows.go b/vendor/github.com/mattn/go-colorable/colorable_windows.go
index 41215d7f..1846ad5a 100644
--- a/vendor/github.com/mattn/go-colorable/colorable_windows.go
+++ b/vendor/github.com/mattn/go-colorable/colorable_windows.go
@@ -1,5 +1,5 @@
-// +build windows
-// +build !appengine
+//go:build windows && !appengine
+// +build windows,!appengine
package colorable
@@ -452,18 +452,22 @@ func (w *Writer) Write(data []byte) (n int, err error) {
} else {
er = bytes.NewReader(data)
}
- var bw [1]byte
+ var plaintext bytes.Buffer
loop:
for {
c1, err := er.ReadByte()
if err != nil {
+ plaintext.WriteTo(w.out)
break loop
}
if c1 != 0x1b {
- bw[0] = c1
- w.out.Write(bw[:])
+ plaintext.WriteByte(c1)
continue
}
+ _, err = plaintext.WriteTo(w.out)
+ if err != nil {
+ break loop
+ }
c2, err := er.ReadByte()
if err != nil {
break loop
diff --git a/vendor/github.com/mattn/go-colorable/noncolorable.go b/vendor/github.com/mattn/go-colorable/noncolorable.go
index 95f2c6be..3df68f36 100644
--- a/vendor/github.com/mattn/go-colorable/noncolorable.go
+++ b/vendor/github.com/mattn/go-colorable/noncolorable.go
@@ -18,18 +18,22 @@ func NewNonColorable(w io.Writer) io.Writer {
// Write writes data on console
func (w *NonColorable) Write(data []byte) (n int, err error) {
er := bytes.NewReader(data)
- var bw [1]byte
+ var plaintext bytes.Buffer
loop:
for {
c1, err := er.ReadByte()
if err != nil {
+ plaintext.WriteTo(w.out)
break loop
}
if c1 != 0x1b {
- bw[0] = c1
- w.out.Write(bw[:])
+ plaintext.WriteByte(c1)
continue
}
+ _, err = plaintext.WriteTo(w.out)
+ if err != nil {
+ break loop
+ }
c2, err := er.ReadByte()
if err != nil {
break loop