From 89ff76f6b4e9b71a4e2b19b0aebd84e3845c088e Mon Sep 17 00:00:00 2001 From: Joao Zanutto Date: Mon, 1 Apr 2024 05:55:37 -0700 Subject: [PATCH 1/3] add default definition for common.tmp_dir --- internal/domains/config.go | 3 +++ 1 file changed, 3 insertions(+) diff --git a/internal/domains/config.go b/internal/domains/config.go index 56436ea0..692411a3 100644 --- a/internal/domains/config.go +++ b/internal/domains/config.go @@ -34,6 +34,9 @@ func NewConfig() *Config { once.Do( func() { Cfg = &Config{ + Common: Common{ + TempDirectory: "/tmp", + }, Storage: StorageConfig{ S3: s3.NewConfig(), }, From 78963f2660551d8517748e57fd36c5a5e9ee2a95 Mon Sep 17 00:00:00 2001 From: Joao Zanutto Date: Mon, 1 Apr 2024 06:43:41 -0700 Subject: [PATCH 2/3] define default tmp_dir as a const variable --- internal/domains/config.go | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/internal/domains/config.go b/internal/domains/config.go index 692411a3..811b3198 100644 --- a/internal/domains/config.go +++ b/internal/domains/config.go @@ -30,12 +30,14 @@ var ( once sync.Once ) +const defaultDirectoryStoragePath = "/tmp" + func NewConfig() *Config { once.Do( func() { Cfg = &Config{ Common: Common{ - TempDirectory: "/tmp", + TempDirectory: defaultDirectoryStoragePath, }, Storage: StorageConfig{ S3: s3.NewConfig(), From c156a50ab5e6864b71f47778ae7156f68b45b30c Mon Sep 17 00:00:00 2001 From: Joao Zanutto Date: Mon, 1 Apr 2024 06:53:57 -0700 Subject: [PATCH 3/3] add tmp default value to docs --- docs/configuration.md | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/docs/configuration.md b/docs/configuration.md index c3375a35..6dc7e243 100644 --- a/docs/configuration.md +++ b/docs/configuration.md @@ -15,7 +15,7 @@ The configuration is organized into six sections: In the `common` section of the configuration, you can specify the following settings: * `pg_bin_path` — path to the PostgreSQL binaries. Note that the PostgreSQL server version must match the provided binaries. -* `tmp_dir` — temporary directory for storing the table of contents files +* `tmp_dir` — temporary directory for storing the table of contents files. Default value is `/tmp` !!! note