1
0
mirror of https://github.com/astaxie/beego.git synced 2025-07-10 02:40:17 +00:00

golint all the files

This commit is contained in:
astaxie
2016-01-18 00:18:21 +08:00
parent da36d1d0e7
commit f925bb9058
16 changed files with 45 additions and 43 deletions

7
cache/cache.go vendored
View File

@ -67,14 +67,15 @@ type Cache interface {
StartAndGC(config string) error
}
type CacheInstance func() Cache
// Instance is a function create a new Cache Instance
type Instance func() Cache
var adapters = make(map[string]CacheInstance)
var adapters = make(map[string]Instance)
// Register makes a cache adapter available by the adapter name.
// If Register is called twice with the same name or if driver is nil,
// it panics.
func Register(name string, adapter CacheInstance) {
func Register(name string, adapter Instance) {
if adapter == nil {
panic("cache: Register adapter is nil")
}