INNER CODE UNIT · Go

runREPLCommand

ktr0731/evans · app/commands.go:258

func runREPLCommand(cfg *mergedConfig, ui cui.UI) error {
	cache, err := cache.Get()
	if err != nil {
		return errors.Wrap(err, "failed to get the cache content")
	}

	baseCtx, cancel := context.WithCancel(context.Background())
	defer cancel()
	eg, ctx := errgroup.WithContext(baseCtx)
	// Run update checker asynchronously.
	eg.Go(func() error {
		return checkUpdate(ctx, cfg.Config, cache)
	})

	if cfg.Config.Meta.AutoUpdate {
		eg.Go(func() error {
			return processUpdate(ctx, cfg.Config, ui.Writer(), cache, prompt.New())
		})

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…