mirror of
https://github.com/golang/term.git
synced 2026-02-09 04:06:04 +03:00
Compare commits
3 Commits
internal-b
...
v0.1.0
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
7a66f970e0 | ||
|
|
a9ba230a40 | ||
|
|
065cf7ba24 |
3
AUTHORS
3
AUTHORS
@@ -1,3 +0,0 @@
|
||||
# This source code refers to The Go Authors for copyright purposes.
|
||||
# The master list of authors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/AUTHORS.
|
||||
@@ -1,3 +0,0 @@
|
||||
# This source code was written by the Go contributors.
|
||||
# The master list of contributors is in the main Go distribution,
|
||||
# visible at http://tip.golang.org/CONTRIBUTORS.
|
||||
@@ -5,7 +5,6 @@
|
||||
package term_test
|
||||
|
||||
import (
|
||||
"io/ioutil"
|
||||
"os"
|
||||
"runtime"
|
||||
"testing"
|
||||
@@ -14,7 +13,7 @@ import (
|
||||
)
|
||||
|
||||
func TestIsTerminalTempFile(t *testing.T) {
|
||||
file, err := ioutil.TempFile("", "TestIsTerminalTempFile")
|
||||
file, err := os.CreateTemp("", "TestIsTerminalTempFile")
|
||||
if err != nil {
|
||||
t.Fatal(err)
|
||||
}
|
||||
|
||||
@@ -935,7 +935,7 @@ func (s *stRingBuffer) Add(a string) {
|
||||
// next most recent, and so on. If such an element doesn't exist then ok is
|
||||
// false.
|
||||
func (s *stRingBuffer) NthPreviousEntry(n int) (value string, ok bool) {
|
||||
if n >= s.size {
|
||||
if n < 0 || n >= s.size {
|
||||
return "", false
|
||||
}
|
||||
index := s.head - n
|
||||
|
||||
Reference in New Issue
Block a user