remove api config,

This commit is contained in:
Miroslav Šedivý
2022-08-03 22:40:47 +02:00
parent 427d350e3d
commit 8f6e6d5241
4 changed files with 1 additions and 31 deletions
-23
View File
@@ -1,23 +0,0 @@
package config
import (
"github.com/spf13/cobra"
"github.com/spf13/viper"
)
type API struct {
Lobby bool
}
func (API) Init(cmd *cobra.Command) error {
cmd.PersistentFlags().Bool("lobby", true, "show lobby when room is not started yet; in order to show lobby, neko-rooms must run on the same subdomain where rooms are published")
if err := viper.BindPFlag("lobby", cmd.PersistentFlags().Lookup("lobby")); err != nil {
return err
}
return nil
}
func (s *API) Set() {
s.Lobby = viper.GetBool("lobby")
}