Welcome to mirror list, hosted at ThFree Co, Russian Federation.

gitlab.com/gitlab-org/gitlab-pages.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'internal/serving/disk/zip/serving.go')
-rw-r--r--internal/serving/disk/zip/serving.go15
1 files changed, 1 insertions, 14 deletions
diff --git a/internal/serving/disk/zip/serving.go b/internal/serving/disk/zip/serving.go
index b31d9090..6d21f771 100644
--- a/internal/serving/disk/zip/serving.go
+++ b/internal/serving/disk/zip/serving.go
@@ -1,10 +1,6 @@
package zip
import (
- "sync"
-
- "gitlab.com/gitlab-org/labkit/log"
-
"gitlab.com/gitlab-org/gitlab-pages/internal/config"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving"
"gitlab.com/gitlab-org/gitlab-pages/internal/serving/disk"
@@ -12,19 +8,10 @@ import (
"gitlab.com/gitlab-org/gitlab-pages/internal/vfs/zip"
)
-var (
- once sync.Once
- instance = disk.New(vfs.Instrumented(zip.New(config.Default.Zip)))
-)
+var instance = disk.New(vfs.Instrumented(zip.New(config.Default.Zip)))
// Instance returns a serving instance that is capable of reading files
// from a zip archives opened from a URL, most likely stored in object storage
func Instance() serving.Serving {
- once.Do(func() {
- if err := instance.Reconfigure(config.Default); err != nil {
- log.WithError(err).Fatal("failed to reconfigure zip serving")
- }
- })
-
return instance
}