comparison pkg/auth/session.go @ 1329:ea2143adc6d3

Named method recievers consistently to make golint happy.
author Sascha L. Teichmann <sascha.teichmann@intevation.de>
date Sun, 25 Nov 2018 17:05:19 +0100
parents 3c914bc670a2
children 20b9c3f261db
comparison
equal deleted inserted replaced
1328:d753ce6cf588 1329:ea2143adc6d3
122 s.access = t 122 s.access = t
123 123
124 return nil 124 return nil
125 } 125 }
126 126
127 func (c *Session) touch() { 127 func (s *Session) touch() {
128 c.mu.Lock() 128 s.mu.Lock()
129 c.access = time.Now() 129 s.access = time.Now()
130 c.mu.Unlock() 130 s.mu.Unlock()
131 } 131 }
132 132
133 func (c *Session) last() time.Time { 133 func (s *Session) last() time.Time {
134 c.mu.Lock() 134 s.mu.Lock()
135 access := c.access 135 access := s.access
136 c.mu.Unlock() 136 s.mu.Unlock()
137 return access 137 return access
138 } 138 }
139 139
140 func GenerateSessionKey() string { 140 func GenerateSessionKey() string {
141 return base64.URLEncoding.EncodeToString( 141 return base64.URLEncoding.EncodeToString(