upgraded bootstrap, fixed style, added share blacklisting

This commit is contained in:
ston1th 2018-09-14 20:49:50 +02:00
commit 3fb1cfc17d
37 changed files with 811 additions and 892 deletions

6
pkg/cache/cache.go vendored
View file

@ -34,11 +34,13 @@ func (c *Cache) Add(title string, p *core.Page) {
c.Cache[title] = &CachedPage{p, now}
}
func (c *Cache) Get(title string) *core.Page {
func (c *Cache) Get(title string) (p *core.Page) {
c.RLock()
defer c.RUnlock()
if cp, ok := c.Cache[title]; ok {
return cp.Page
p = new(core.Page)
*p = *cp.Page
return
}
return nil
}