large refactor, fixes #2

This commit is contained in:
Craig 2020-01-18 23:30:09 +00:00
parent 2729c66ccc
commit 7aa034f3ba
59 changed files with 2766 additions and 1345 deletions

View file

@ -11,13 +11,15 @@ import (
func init() {
command := &cobra.Command{
Use: "serve",
Short: "",
Long: ``,
Short: "serve neko streaming server",
Long: `serve neko streaming server`,
Run: neko.Service.ServeCommand,
}
configs := []config.Config{
neko.Service.Serve,
neko.Service.Server,
neko.Service.WebRTC,
neko.Service.WebSocket,
}
cobra.OnInitialize(func() {
@ -29,7 +31,7 @@ func init() {
for _, cfg := range configs {
if err := cfg.Init(command); err != nil {
log.Panic().Err(err).Msg("Unable to run command")
log.Panic().Err(err).Msg("unable to run serve command")
}
}