abstract terminal interface
This commit is contained in:
+3
-3
@@ -8,10 +8,10 @@ import (
|
||||
"strings"
|
||||
)
|
||||
|
||||
func (proc *Proc) RenderProc(console *strings.Builder) {
|
||||
fmt.Fprintf(console, "=== %s ===\033[K\n", proc.Model())
|
||||
func (proc *Proc) Render(term common.Terminal) {
|
||||
term.Header(proc.Model())
|
||||
for _, driver := range proc.drivers {
|
||||
driver.Render(console)
|
||||
driver.Render(term)
|
||||
}
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user