1
0
mirror of https://github.com/alexedwards/scs.git synced 2025-07-15 01:04:36 +02:00

Fix typos

This commit is contained in:
gandaldf
2022-01-01 12:38:00 +01:00
parent 485a8f5fae
commit fc1ac1d3e3
3 changed files with 6 additions and 6 deletions

View File

@ -150,7 +150,7 @@ The session stores currently included are shown in the table below. Please click
| [badgerstore](https://github.com/alexedwards/scs/tree/master/badgerstore) | Badger based session store |
| [boltstore](https://github.com/alexedwards/scs/tree/master/boltstore) | Bolt based session store |
| [buntdbstore](https://github.com/alexedwards/scs/tree/master/buntdbstore) | BuntDB based session store |
| [etcdstore](https://github.com/alexedwards/scs/tree/master/etcdstore) | ETCD based session store |
| [etcdstore](https://github.com/alexedwards/scs/tree/master/etcdstore) | Etcd based session store |
| [firestore](https://github.com/alexedwards/scs/tree/master/firestore) | Google Cloud Firestore based session store |
| [gormstore](https://github.com/alexedwards/scs/tree/master/gormstore) | GORM based session store |
| [leveldbstore](https://github.com/alexedwards/scs/tree/master/leveldbstore) | LevelDB based session store |

View File

@ -1,6 +1,6 @@
# etcdstore
A [ETCD](https://github.com/etcd-io/etcd) based session store for [SCS](https://github.com/alexedwards/scs).
A [etcd](https://github.com/etcd-io/etcd) based session store for [SCS](https://github.com/alexedwards/scs).
## Setup
@ -23,7 +23,7 @@ import (
var sessionManager *scs.SessionManager
func main() {
// Establish connection to ETCD.
// Establish connection to etcd.
cli, err := clientv3.New(clientv3.Config{
Endpoints: []string{"host:2379"},
DialTimeout: 5 * time.Second,
@ -56,7 +56,7 @@ func getHandler(w http.ResponseWriter, r *http.Request) {
## Expired Session Cleanup
ETCD will [automatically remove](https://etcd.io/docs/v3.5/tutorials/how-to-create-lease/) expired session keys.
Etcd will [automatically remove](https://etcd.io/docs/v3.5/tutorials/how-to-create-lease/) expired session keys.
## Key Collisions

View File

@ -14,13 +14,13 @@ type EtcdStore struct {
}
// New returns a new EtcdStore instance.
// The client parameter should be a pointer to a ETCD client instance.
// The client parameter should be a pointer to a etcd client instance.
func New(client *clientv3.Client) *EtcdStore {
return NewWithPrefix(client, "scs:session:")
}
// NewWithPrefix returns a new EtcdStore instance. The client parameter should be a pointer
// to a ETCD client instance. The prefix parameter controls the ETCD key
// to a etcd client instance. The prefix parameter controls the etcd key
// prefix, which can be used to avoid naming clashes if necessary.
func NewWithPrefix(client *clientv3.Client, prefix string) *EtcdStore {
return &EtcdStore{