diff --git a/backend/Dockerfile b/backend/Dockerfile index 40e228997..caf431a51 100644 --- a/backend/Dockerfile +++ b/backend/Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.10.2 +FROM golang:1.13.0 ENV SCOPE_SKIP_UI_ASSETS true RUN set -eux; \ export arch_val="$(dpkg --print-architecture)"; \ diff --git a/render/theinternet.go b/render/theinternet.go index 7d477f37e..8330d348e 100644 --- a/render/theinternet.go +++ b/render/theinternet.go @@ -5,7 +5,7 @@ import ( "regexp" "strings" - "github.com/camlistore/camlistore/pkg/lru" + "camlistore.org/pkg/lru" "github.com/weaveworks/scope/report" ) diff --git a/vendor/github.com/camlistore/camlistore/pkg/lru/COPYING b/vendor/camlistore.org/pkg/lru/COPYING similarity index 100% rename from vendor/github.com/camlistore/camlistore/pkg/lru/COPYING rename to vendor/camlistore.org/pkg/lru/COPYING diff --git a/vendor/github.com/camlistore/camlistore/pkg/lru/cache.go b/vendor/camlistore.org/pkg/lru/cache.go similarity index 95% rename from vendor/github.com/camlistore/camlistore/pkg/lru/cache.go rename to vendor/camlistore.org/pkg/lru/cache.go index 4a31a7b19..c805ce1b4 100644 --- a/vendor/github.com/camlistore/camlistore/pkg/lru/cache.go +++ b/vendor/camlistore.org/pkg/lru/cache.go @@ -24,7 +24,7 @@ import ( // Cache is an LRU cache, safe for concurrent access. type Cache struct { - maxEntries int + maxEntries int // zero means no limit mu sync.Mutex ll *list.List @@ -38,6 +38,7 @@ type entry struct { } // New returns a new cache with the provided maximum items. +// A maxEntries of 0 means no limit. func New(maxEntries int) *Cache { return &Cache{ maxEntries: maxEntries, @@ -63,7 +64,7 @@ func (c *Cache) Add(key string, value interface{}) { ele := c.ll.PushFront(&entry{key, value}) c.cache[key] = ele - if c.ll.Len() > c.maxEntries { + if c.maxEntries > 0 && c.ll.Len() > c.maxEntries { c.removeOldest() } } diff --git a/vendor/manifest b/vendor/manifest index ff2910555..cf6d443e7 100644 --- a/vendor/manifest +++ b/vendor/manifest @@ -8,6 +8,15 @@ "revision": "75cd24fc2f2c", "branch": "default" }, + { + "importpath": "camlistore.org/pkg/lru", + "repository": "https://github.com/camlistore/old-cam-snapshot", + "vcs": "git", + "revision": "a5a65f0d8b2281c4cc8c259ba882dd0ec851427f", + "branch": "master", + "path": "/pkg/lru", + "notests": true + }, { "importpath": "github.com/Azure/go-ansiterm", "repository": "https://github.com/Azure/go-ansiterm", @@ -238,15 +247,6 @@ "path": "/statsd", "notests": true }, - { - "importpath": "github.com/camlistore/camlistore/pkg/lru", - "repository": "https://github.com/camlistore/camlistore", - "vcs": "git", - "revision": "f9dcdfb07a66d3cc07176b50e1a6cbee879e1b90", - "branch": "master", - "path": "/pkg/lru", - "notests": true - }, { "importpath": "github.com/certifi/gocertifi", "repository": "https://github.com/certifi/gocertifi",