tg/go.go

23 lines
341 B
Go
Raw Permalink Normal View History

package tg
func Go(pth Path) UI {
return UI{
GoWidget(pth),
}
}
type GoWidget string
// Implementing the Server interface.
func (widget GoWidget) Serve(c Context) {
c.input.Close()
c.Go(Path(widget))
}
func (widget GoWidget) Render(c Context) UI {
return UI{widget}
}
func (widget GoWidget) Filter(u Update) bool {
return true
}