Install & Compatibility
Where this runs
No compatibility data collected yet for this library.
Code
Verified usage
Verified import paths — ran on the pinned version, not inferred.
session
✓ github.com/go-session/session
Starts a session, sets a key-value pair, and saves it.
package main
import (
"net/http"
"github.com/go-session/session"
)
func handler(w http.ResponseWriter, r *http.Request) {
store, _ := session.Start(r.Context(), w, r)
store.Set("key", "value")
store.Save()
}
func main() {
http.HandleFunc("/", handler)
http.ListenAndServe(":8080", nil)
}
Debug
Known issues
gotchaVersion 3.1.2+incompatible uses an older module versioning scheme; ensure compatibility with your Go version.fixUse a newer compatible version if available, or pin to this version with care.
affects: 3.1.2+incompatible
Upgrade
Version history
3.1.2+incompatiblelatest on pkg.go.dev
Audit
Dependencies
No dependency data recorded yet.