You've already forked golang-base-project
Adds godoc comments
This commit is contained in:
@ -5,6 +5,7 @@ import (
|
||||
"time"
|
||||
)
|
||||
|
||||
// Session holds information about user sessions and when they expire
|
||||
type Session struct {
|
||||
gorm.Model
|
||||
Identifier string
|
||||
@ -12,6 +13,7 @@ type Session struct {
|
||||
ExpiresAt time.Time
|
||||
}
|
||||
|
||||
// HasExpired is a helper function that checks if the current time is after the session expire datetime
|
||||
func (s Session) HasExpired() bool {
|
||||
return s.ExpiresAt.Before(time.Now())
|
||||
}
|
||||
|
Reference in New Issue
Block a user