diff options
author | Alan Pearce | 2024-06-09 17:54:57 +0200 |
---|---|---|
committer | Alan Pearce | 2024-06-09 17:54:57 +0200 |
commit | 63599c719d8e4e09548546bb366a849ef40c602b (patch) | |
tree | 549336370f77a8a1a3c626fe6bf0118f32baef59 /internal/config/default.go | |
parent | 789d0079f84017ddafad763ffba9aadbcd6aa6da (diff) | |
download | searchix-63599c719d8e4e09548546bb366a849ef40c602b.tar.lz searchix-63599c719d8e4e09548546bb366a849ef40c602b.tar.zst searchix-63599c719d8e4e09548546bb366a849ef40c602b.zip |
feat: add low-memory mode
Diffstat (limited to 'internal/config/default.go')
-rw-r--r-- | internal/config/default.go | 9 |
1 files changed, 5 insertions, 4 deletions
diff --git a/internal/config/default.go b/internal/config/default.go index 5e7b388..5b924a9 100644 --- a/internal/config/default.go +++ b/internal/config/default.go @@ -18,7 +18,7 @@ const self = "'self'" const maxAge = (1 * 365 * 24 * time.Hour) -var defaultConfig = Config{ +var DefaultConfig = Config{ DataPath: "./data", Web: &Web{ ListenAddress: "localhost", @@ -47,8 +47,9 @@ var defaultConfig = Config{ }, }, Importer: &Importer{ - Timeout: Duration{30 * time.Minute}, - UpdateAt: mustLocalTime("04:00:00"), + LowMemory: false, + Timeout: Duration{30 * time.Minute}, + UpdateAt: mustLocalTime("04:00:00"), Sources: map[string]*Source{ "nixos": { Name: "NixOS", @@ -116,7 +117,7 @@ var defaultConfig = Config{ } func GetDefaultConfig() string { - out, err := toml.Marshal(&defaultConfig) + out, err := toml.Marshal(&DefaultConfig) if err != nil { panic("could not read default configuration") } |