1
0
mirror of https://github.com/astaxie/beego.git synced 2025-06-11 20:00:39 +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")
}

8
cache/file.go vendored
View File

@ -39,10 +39,10 @@ type FileCacheItem struct {
// FileCache Config
var (
FileCachePath = "cache" // cache directory
FileCacheFileSuffix = ".bin" // cache file suffix
FileCacheDirectoryLevel = 2 // cache file deep level if auto generated cache files.
FileCacheEmbedExpiry time.Duration = 0 // cache expire time, default is no expire forever.
FileCachePath = "cache" // cache directory
FileCacheFileSuffix = ".bin" // cache file suffix
FileCacheDirectoryLevel = 2 // cache file deep level if auto generated cache files.
FileCacheEmbedExpiry time.Duration // cache expire time, default is no expire forever.
)
// FileCache is cache adapter for file storage.