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

gitlab.com/gitlab-org/gitlab-foss.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'workhorse/internal/config/config.go')
-rw-r--r--workhorse/internal/config/config.go8
1 files changed, 7 insertions, 1 deletions
diff --git a/workhorse/internal/config/config.go b/workhorse/internal/config/config.go
index d84bab16541..562ea05bfd0 100644
--- a/workhorse/internal/config/config.go
+++ b/workhorse/internal/config/config.go
@@ -156,8 +156,14 @@ var DefaultImageResizerConfig = ImageResizerConfig{
MaxFilesize: 250 * 1000, // 250kB,
}
+func NewDefaultConfig() *Config {
+ return &Config{
+ ImageResizerConfig: DefaultImageResizerConfig,
+ }
+}
+
func LoadConfig(data string) (*Config, error) {
- cfg := &Config{ImageResizerConfig: DefaultImageResizerConfig}
+ cfg := NewDefaultConfig()
if _, err := toml.Decode(data, cfg); err != nil {
return nil, err