package main

import (
	"fmt"
	"io/ioutil"
	"log"

	"gopkg.in/gcfg.v1"
)

var serverConfig = struct {
	Server struct {
		Port string
	}
	Message struct {
		Timeout int
	}
	TLS struct {
		UseHTTPS bool
		Cert     string
		Key      string
	}
}{}

func readConfig() {
	log.Println("Reading config")
	filebytes, _ := ioutil.ReadFile("webscripthook.server.ini")
	cfgStr := string(filebytes)
	fmt.Println(cfgStr)
	err := gcfg.ReadStringInto(&serverConfig, cfgStr)
	if err != nil {
		log.Fatalf("Failed to parse gcfg data: %s", err)
	}
}

package main

import (
	"fmt"
	"io/ioutil"
	"log"

	"gopkg.in/gcfg.v1"
)

var serverConfig = struct {
	Server struct {
		Port string
	}
	Message struct {
		Timeout int
	}
	TLS struct {
		UseHTTPS bool
		Cert     string
		Key      string
	}
	WebSocketAuth struct {
		Username string
		Password string
	}
}{}

func readConfig() {
	log.Println("Reading config")
	filebytes, _ := ioutil.ReadFile("webscripthook.server.ini")
	cfgStr := string(filebytes)
	fmt.Println(cfgStr)
	err := gcfg.ReadStringInto(&serverConfig, cfgStr)
	if err != nil {
		log.Fatalf("Failed to parse gcfg data: %s", err)
	}
}

--- 
+++ 
@@ -20,10 +20,6 @@
 		Cert     string
 		Key      string
 	}
-	WebSocketAuth struct {
-		Username string
-		Password string
-	}
 }{}
 
 func readConfig() {
Remove auth from server config struct
