From 0896799a25ab6d5bd83aff33d4c9a26c1f3f9055 Mon Sep 17 00:00:00 2001 From: Gregory Eremin Date: Sat, 7 Mar 2015 22:04:28 +0700 Subject: [PATCH] Rename sessionID to sid --- server/request.go | 18 +++++++++--------- 1 file changed, 9 insertions(+), 9 deletions(-) diff --git a/server/request.go b/server/request.go index 5c71be9..0b838ba 100644 --- a/server/request.go +++ b/server/request.go @@ -13,10 +13,10 @@ import ( type ( request struct { - r *http.Request - w http.ResponseWriter - sessionID string - login string + r *http.Request + w http.ResponseWriter + sid string + login string } statRequest struct { org string @@ -31,16 +31,16 @@ func parseRequest(w http.ResponseWriter, r *http.Request) (*request, *statReques sid := sessionID(w, r) login, _ := redis.String(redisPool.Get().Do("HGET", "sessions", sid)) req := &request{ - r: r, - w: w, - sessionID: sid, - login: login, + r: r, + w: w, + sid: sid, + login: login, } return req, parseStatRequest(r) } func (r *request) authorize(login string) { - redisPool.Get().Do("HSET", "sessions", r.sessionID, login) + redisPool.Get().Do("HSET", "sessions", r.sid, login) } func (r *request) respondWith(resp interface{}) {