checkpoint
parent
c885495ef4
commit
0cb291326a
|
|
@ -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
|
||||
|
|
|
|||
|
|
@ -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)
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
|
|
|||
Loading…
Reference in New Issue