mirror of
https://github.com/walles/moar.git
synced 2024-09-21 09:01:30 +03:00
Fix a broken test
This commit is contained in:
parent
54935615ed
commit
2b12953600
@ -201,11 +201,15 @@ func newReaderFromStream(reader io.Reader, fromFilter *exec.Cmd) *Reader {
|
||||
// Moar in the bottom left corner of the screen.
|
||||
func NewReaderFromText(name string, text string) *Reader {
|
||||
noExternalNewlines := strings.Trim(text, "\n")
|
||||
lines := []string{}
|
||||
if len(noExternalNewlines) > 0 {
|
||||
lines = strings.Split(noExternalNewlines, "\n")
|
||||
}
|
||||
done := make(chan bool, 1)
|
||||
done <- true
|
||||
return &Reader{
|
||||
name: &name,
|
||||
lines: strings.Split(noExternalNewlines, "\n"),
|
||||
lines: lines,
|
||||
lock: &sync.Mutex{},
|
||||
done: done,
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user