INNER CODE UNIT · Go

run

elys-network/elys · indexer/cmd/indexer/main.go:41

func run(cmd *cobra.Command, args []string) error {
	// Setup logger
	logger, err := setupLogger(logLevel)
	if err != nil {
		return fmt.Errorf("failed to setup logger: %w", err)
	}
	defer logger.Sync()

	// Load configuration
	cfg, err := config.Load(configPath)
	if err != nil {
		return fmt.Errorf("failed to load config: %w", err)
	}

	// Setup context with cancellation
	ctx, cancel := context.WithCancel(context.Background())
	defer cancel()

View source record →

📰 Research Paper
Loading…
⏳ Fetching content…