Add breaking changes note to README

This adds a section about breaking changes and when they were introduced in the README.
This commit is contained in:
Anton Lindström 2016-07-19 21:21:08 +02:00 committed by GitHub
parent f20977c3dd
commit 3d07ee7804
1 changed files with 8 additions and 1 deletions

View File

@ -16,7 +16,10 @@ See http://www.gorillatoolkit.org/pkg/sessions for full documentation on underly
```go ```go
// Fetch new store. // Fetch new store.
store := NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key")) store, err := NewPGStore("postgres://user:password@127.0.0.1:5432/database?sslmode=verify-full", []byte("secret-key"))
if err != nil {
log.Error(err.Error())
}
defer store.Close() defer store.Close()
// Run a background goroutine to clean up expired sessions from the database. // Run a background goroutine to clean up expired sessions from the database.
defer store.StopCleanup(store.Cleanup(time.Minute * 5)) defer store.StopCleanup(store.Cleanup(time.Minute * 5))
@ -42,6 +45,10 @@ if err = sessions.Save(req, rsp); err != nil {
} }
``` ```
## Breaking changes
* 2016-07-19 - `NewPGStore` and `NewPGStoreFromPool` now returns `(*PGStore, error)`
## Thanks ## Thanks
I've stolen, borrowed and gotten inspiration from the other backends available: I've stolen, borrowed and gotten inspiration from the other backends available: