qcc/cmd/qccd/main.go
2026-06-30 12:52:09 +03:00

30 lines
622 B
Go

package qccd
import (
"fmt"
"os"
"path/filepath"
"github.com/spf13/cobra"
)
var cfgFile string
var rootCmd = &cobra.Command{
Use: filepath.Base(os.Args[0]),
Short: "QuiC Call server daemon",
Long: "QuiC Call — audio/video call server with PoW authentication and X.509 PKI. A phone system replacement.",
}
func Execute() {
if err := rootCmd.Execute(); err != nil {
fmt.Fprintln(os.Stderr, err)
os.Exit(1)
}
}
func init() {
cobra.OnInitialize(initConfig)
rootCmd.PersistentFlags().StringVarP(&cfgFile, "config", "c", "", "config file path (default ./config.yaml)")
rootCmd.AddCommand(serverCmd)
}