Files
upstream-centrifugo/internal/app/cmd.go
upstream-mirror b352a9a30d
Some checks failed
test / Lint (push) Failing after 3s
test / Test with Go 1.26.8 (push) Failing after 2s
snapshot of https://github.com/centrifugal/centrifugo.git (master, 2026-09-16; blobs > 131072B omitted)
2026-09-16 01:17:21 +05:00

22 lines
523 B
Go
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
package app
import (
"github.com/centrifugal/centrifugo/v6/internal/config"
"github.com/spf13/cobra"
)
func Centrifugo() *cobra.Command {
var configFile string
cmd := &cobra.Command{
Use: "",
Short: "Centrifugo",
Long: "Centrifugo – scalable real-time messaging server in language-agnostic way",
Run: func(cmd *cobra.Command, args []string) {
Run(cmd, configFile)
},
}
cmd.Flags().StringVarP(&configFile, "config", "c", "config.json", "path to config file")
config.DefineFlags(cmd)
return cmd
}