package db import ( "github.com/gin-contrib/sessions" gormsessions "github.com/gin-contrib/sessions/gorm" "github.com/spf13/viper" ) func CreateStore() sessions.Store { sessionKey := viper.GetString("web.sessionkey") // moved to memory stored sessions, ideally switching back to GORM if I can fix it store := gormsessions.NewStore(conn, true, []byte(sessionKey)) return store }