all repos — searchix @ 830e14f372fcff094448ac8528386ab381f6f35c

Search engine for NixOS, nix-darwin, home-manager and NUR users

refactor: pass Source object to templates

Alan Pearce
commit

830e14f372fcff094448ac8528386ab381f6f35c

parent

c72f8dc787379f6544739c5c57a8241a14f6d2a0

1 file changed, 3 insertions(+), 3 deletions(-)

changed files
M internal/config/config.gointernal/config/config.go
@@ -30,7 +30,7 @@ type Config struct {
DataPath string `toml:"data-path"` CSP CSP `toml:"content-security-policy"` Headers map[string]string - Sources map[string]importer.Source + Sources map[string]*importer.Source } var defaultConfig = Config{
@@ -41,7 +41,7 @@ },
Headers: map[string]string{ "x-content-type-options": "nosniff", }, - Sources: map[string]importer.Source{ + Sources: map[string]*importer.Source{ "nixos": { Name: "NixOS", Enable: true,
@@ -114,7 +114,7 @@ return nil, errors.Wrap(err, "config error")
} } - maps.DeleteFunc(config.Sources, func(_ string, v importer.Source) bool { + maps.DeleteFunc(config.Sources, func(_ string, v *importer.Source) bool { return !v.Enable })