Add conf file var

This commit is contained in:
Zorglube 2020-08-20 18:14:57 +02:00 committed by GitHub
parent 8b2e1af6b0
commit ef0beae00f
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 3 additions and 1 deletions

View File

@ -20,11 +20,12 @@ var (
sKey string
stats = newStreamStats()
sAdminPass string
confFile string
)
func setupSettings() error {
var err error
settings, err = LoadSettings("settings.json")
settings, err = LoadSettings(confFile)
if err != nil {
return fmt.Errorf("Unable to load settings: %s", err)
}
@ -53,6 +54,7 @@ func main() {
flag.StringVar(&sKey, "k", "", "Stream key, to protect your stream")
flag.StringVar(&sAdminPass, "a", "", "Set admin password. Overrides configuration in settings.json. This will not write the password to settings.json.")
flag.BoolVar(&pullEmotes, "e", false, "Pull emotes")
flag.StringVar(&confFile, "f", "", "URI of the conf file")
flag.Parse()
format.RegisterAll()