ui: Refactoring

This commit is contained in:
Hajime Hoshi 2018-10-14 03:40:18 +09:00
parent 443e3ae3a4
commit 7e29a81177

View File

@ -229,9 +229,8 @@ func (u *userInterface) update(g GraphicsContext) error {
func (u *userInterface) loop(g GraphicsContext) error {
ch := make(chan error)
var f func([]js.Value)
var cf js.Callback
f = func([]js.Value) {
f := func([]js.Value) {
if err := u.update(g); err != nil {
ch <- err
close(ch)