more fixes
This commit is contained in:
parent
9b832d3f71
commit
54c3afa5c2
4
gui.go
4
gui.go
@ -25,6 +25,7 @@ package main
|
|||||||
import (
|
import (
|
||||||
"log"
|
"log"
|
||||||
"path/filepath"
|
"path/filepath"
|
||||||
|
"strings"
|
||||||
|
|
||||||
"github.com/andlabs/ui"
|
"github.com/andlabs/ui"
|
||||||
)
|
)
|
||||||
@ -35,8 +36,9 @@ type logger struct {
|
|||||||
}
|
}
|
||||||
|
|
||||||
func (l *logger) Write(p []byte) (n int, err error) {
|
func (l *logger) Write(p []byte) (n int, err error) {
|
||||||
|
data := strings.Trim(string(p), "\n")
|
||||||
ui.QueueMain(func() {
|
ui.QueueMain(func() {
|
||||||
l.box.Append(ui.NewLabel(string(p)), false)
|
l.box.Append(ui.NewLabel(data), false)
|
||||||
l.count++
|
l.count++
|
||||||
})
|
})
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user