Commit a9b5b07
Changed files (1)
client.go
@@ -29,9 +29,6 @@ var config CONFIG
// loadClientConfiguration loads the configuration for the client using the given string
func loadClientConfiguration(cfgFile string) CONFIG {
log.Printf("Loading configuration from %s.", cfgFile)
- config.SERVER = "127.0.0.1"
- config.PORT = 8080
- config.USE_HTTPS = false
_, err := toml.DecodeFile(cfgFile, &config)
if err != nil {
log.Fatalf("Could not read configuration file: %+v\n", err.Error())
@@ -93,6 +90,9 @@ func initUserSession() {
// initializes the client and handles the user interaction
func main() {
+ config.SERVER = "127.0.0.1"
+ config.PORT = 80
+ config.USE_HTTPS = false
filePath := flag.String("file", "", "defines a path to the configuration file")
flag.Parse()
if strings.Compare(*filePath, "") != 0 {