tricrypt/tui/channel_errors.go
2024-05-01 17:21:10 +03:00

18 lines
347 B
Go

package tui
import "git.qowevisa.me/Qowevisa/gotell/errors"
func (t *TUI) launchErrorsChannel() error {
if t.errorsChannel == nil {
return errors.WrapErr("t.errors", errors.NOT_INIT)
}
go func() {
for err := range t.errorsChannel {
if err != nil {
t.createNotification(err.Error(), CONST_ERROR_N_TITLE)
}
}
}()
return nil
}