Allocate stuff the same way everywhere.
authorOllivier Robert <roberto@keltia.net>
Mon, 10 Apr 2017 20:55:45 +0200
changeset 51 4a0533d00053
parent 50 80a09cf62225
child 52 825b890aff85
Allocate stuff the same way everywhere.
config.go
--- a/config.go	Mon Apr 10 20:47:08 2017 +0200
+++ b/config.go	Mon Apr 10 20:55:45 2017 +0200
@@ -80,8 +80,7 @@
 			return s, fmt.Errorf("Can not read %s", file)
 		}
 
-		var sc Server
-
+		sc := Server{}
 		err = toml.Unmarshal(buf, &sc)
 		if err != nil {
 			return s, fmt.Errorf("Error parsing toml %s: %v", file, err)