-
Notifications
You must be signed in to change notification settings - Fork 23
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Deprecate support for Golang version 1.15 and 1.16, and improve the package documentation.
- Loading branch information
Showing
14 changed files
with
63 additions
and
36 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package bolt providers a cache driver that stores the cache using BoltDB. | ||
package bolt | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,22 +1,23 @@ | ||
// Package cachego provides a simple way to use cache drivers. | ||
// | ||
// Example Usage | ||
// # Example Usage | ||
// | ||
// The following is a simple example using memcached driver: | ||
// import ( | ||
// "fmt" | ||
// "github.com/faabiosr/cachego" | ||
// "github.com/bradfitz/gomemcache/memcache" | ||
// ) | ||
// | ||
// func main() { | ||
// import ( | ||
// "fmt" | ||
// "github.com/faabiosr/cachego" | ||
// "github.com/bradfitz/gomemcache/memcache" | ||
// ) | ||
// | ||
// cache := cachego.NewMemcached( | ||
// memcached.New("localhost:11211"), | ||
// ) | ||
// func main() { | ||
// | ||
// cache.Save("foo", "bar") | ||
// cache := cachego.NewMemcached( | ||
// memcached.New("localhost:11211"), | ||
// ) | ||
// | ||
// fmt.Println(cache.Fetch("foo")) | ||
// } | ||
// cache.Save("foo", "bar") | ||
// | ||
// fmt.Println(cache.Fetch("foo")) | ||
// } | ||
package cachego |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package file providers a cache driver that stores the cache content in files. | ||
package file | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,17 +1,34 @@ | ||
module github.com/faabiosr/cachego | ||
|
||
go 1.15 | ||
go 1.17 | ||
|
||
require ( | ||
github.com/bradfitz/gomemcache v0.0.0-20170208213004-1952afaa557d | ||
github.com/garyburd/redigo v1.6.0 // indirect | ||
github.com/mattn/go-sqlite3 v1.6.0 | ||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect | ||
github.com/onsi/ginkgo v1.13.0 // indirect | ||
go.etcd.io/bbolt v1.3.4 | ||
go.mongodb.org/mongo-driver v1.9.0 | ||
gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a // indirect | ||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect | ||
gopkg.in/mgo.v2 v2.0.0-20160818020120-3f83fa500528 | ||
gopkg.in/redis.v4 v4.2.4 | ||
) | ||
|
||
require ( | ||
github.com/garyburd/redigo v1.6.0 // indirect | ||
github.com/go-stack/stack v1.8.0 // indirect | ||
github.com/golang/snappy v0.0.1 // indirect | ||
github.com/klauspost/compress v1.13.6 // indirect | ||
github.com/niemeyer/pretty v0.0.0-20200227124842-a10e7caefd8e // indirect | ||
github.com/onsi/ginkgo v1.13.0 // indirect | ||
github.com/onsi/gomega v1.10.1 // indirect | ||
github.com/pkg/errors v0.9.1 // indirect | ||
github.com/xdg-go/pbkdf2 v1.0.0 // indirect | ||
github.com/xdg-go/scram v1.0.2 // indirect | ||
github.com/xdg-go/stringprep v1.0.2 // indirect | ||
github.com/youmark/pkcs8 v0.0.0-20181117223130-1be2e3e5546d // indirect | ||
golang.org/x/crypto v0.0.0-20201216223049-8b5274cf687f // indirect | ||
golang.org/x/sync v0.0.0-20190911185100-cd5d95a43a6e // indirect | ||
golang.org/x/sys v0.0.0-20200519105757-fe76b779f299 // indirect | ||
golang.org/x/text v0.3.5 // indirect | ||
gopkg.in/bsm/ratelimit.v1 v1.0.0-20160220154919-db14e161995a // indirect | ||
gopkg.in/check.v1 v1.0.0-20200227125254-8fa46927fb4f // indirect | ||
gopkg.in/yaml.v2 v2.3.0 // indirect | ||
) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package memcached providers a cache driver that stores the cache in Memcached. | ||
package memcached | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package mongo providers a cache driver that uses MongoDB with MGO driver. | ||
package mongo | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package redis providers a cache driver that stores the cache in Redis. | ||
package redis | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package sqlite3 providers a cache driver that stores the cache in SQLite3. | ||
package sqlite3 | ||
|
||
import ( | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
// Package sync providers a cache driver that uses standard golang sync.Map. | ||
package sync | ||
|
||
import ( | ||
|