diff options
Diffstat (limited to 'server/main.go')
-rw-r--r-- | server/main.go | 7 |
1 files changed, 3 insertions, 4 deletions
diff --git a/server/main.go b/server/main.go index 4cf49ed..03a62a4 100644 --- a/server/main.go +++ b/server/main.go @@ -40,7 +40,7 @@ func main() { peerHashes = append(peerHashes, sha256sum(me)) hashToDomain = map[string]string{peerHashes[0]: me} kvstore = make(map[string][]byte) - users = make(map[string]user) + users = make(map[string]*user) // Load user data from disk os.Mkdir(dataDir, 0755) @@ -55,9 +55,9 @@ func main() { log.Fatal(err) continue } - var user user + var user *user dec := gob.NewDecoder(reader) - dec.Decode(&user) + dec.Decode(user) users[id] = user } @@ -69,7 +69,6 @@ func main() { go cleanKVStore() go redistributeKeys() - http.HandleFunc("/", func(w http.ResponseWriter, r *http.Request) { fmt.Fprintf(w, "Hello! This is a Kela server.") }) |