INNER CODE UNIT · Go
main
elys-network/elys · indexer/cmd/indexer/main.go:25
func main() {
rootCmd := &cobra.Command{
Use: "elys-indexer",
Short: "Elys chain indexer for TradeSheild and Perpetual modules",
RunE: run,
}
rootCmd.PersistentFlags().StringVarP(&configPath, "config", "c", "config.yaml", "Path to configuration file")
rootCmd.PersistentFlags().StringVarP(&logLevel, "log-level", "l", "info", "Log level (debug, info, warn, error)")
if err := rootCmd.Execute(); err != nil {
fmt.Fprintf(os.Stderr, "Error: %v\n", err)
os.Exit(1)
}
}
func run(cmd *cobra.Command, args []string) error {
// Setup logger