checkpoint

mine
derailed 2019-12-28 18:37:23 -07:00
parent c885495ef4
commit 0cb291326a
3 changed files with 5 additions and 3 deletions

View File

@ -105,7 +105,8 @@ func (a Aliases) Define(gvr string, aliases ...string) {
func (a Aliases) LoadAliases(path string) error {
f, err := ioutil.ReadFile(path)
if err != nil {
return err
log.Warn().Err(err).Msgf("No custom aliases found")
return nil
}
var aa Aliases

View File

@ -11,6 +11,8 @@ import (
"github.com/rs/zerolog/log"
)
const refreshRate = 1 * time.Second
type TableListener interface {
TableDataChanged(render.TableData)
TableLoadFailed(error)
@ -87,7 +89,7 @@ func (t *Table) updater(ctx context.Context) {
select {
case <-ctx.Done():
return
case <-time.After(t.refreshRate):
case <-time.After(refreshRate):
t.refresh(ctx)
}
}

View File

@ -26,7 +26,6 @@ func newCommand(app *App) *command {
}
func (c *command) Init() error {
log.Debug().Msgf("COMMAND INIT")
c.alias = dao.NewAlias(c.app.factory)
if _, err := c.alias.Ensure(); err != nil {
return err