diff options
| author | Jacky Zhao <[email protected]> | 2020-05-09 16:02:10 -0700 |
|---|---|---|
| committer | GitHub <[email protected]> | 2020-05-09 16:02:10 -0700 |
| commit | 6e69cfa1794d20e3dd41ea9074a7c8a79d51c099 (patch) | |
| tree | fe078d33c11e21b684af8f400d1667b2411c5415 /cache | |
| parent | fix port bug (diff) | |
| parent | Lowercase json response (diff) | |
| download | ctrl-v-6e69cfa1794d20e3dd41ea9074a7c8a79d51c099.tar.xz ctrl-v-6e69cfa1794d20e3dd41ea9074a7c8a79d51c099.zip | |
Merge pull request #2 from jackyzha0/api
Add get hash endpoint
Diffstat (limited to 'cache')
| -rw-r--r-- | cache/cache.go | 6 |
1 files changed, 4 insertions, 2 deletions
diff --git a/cache/cache.go b/cache/cache.go index b311efa..bac7ea8 100644 --- a/cache/cache.go +++ b/cache/cache.go @@ -11,8 +11,10 @@ type Cache struct { lock sync.RWMutex } -func New() *Cache { - return &Cache{ +var C *Cache + +func init() { + C = &Cache{ m: map[string]db.Paste{}, } } |