diff options
author | Alan Pearce | 2024-05-17 17:02:00 +0200 |
---|---|---|
committer | Alan Pearce | 2024-05-17 17:02:00 +0200 |
commit | 3b877b39b424ded0f776d1dc71d07616a47bfbd4 (patch) | |
tree | ae438cc9b532c622689d7dec013d5a5264aec74c /internal/importer/options.go | |
parent | 041ebd2291db60e73d7fc213cd8a74d33b7f089b (diff) | |
download | searchix-3b877b39b424ded0f776d1dc71d07616a47bfbd4.tar.lz searchix-3b877b39b424ded0f776d1dc71d07616a47bfbd4.tar.zst searchix-3b877b39b424ded0f776d1dc71d07616a47bfbd4.zip |
fix: store only data from current entity in index
Diffstat (limited to 'internal/importer/options.go')
-rw-r--r-- | internal/importer/options.go | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/internal/importer/options.go b/internal/importer/options.go index 1247681..51a6eb4 100644 --- a/internal/importer/options.go +++ b/internal/importer/options.go @@ -120,7 +120,6 @@ func (i *OptionIngester) Process(parent context.Context) (<-chan nix.Importable, var decls []*nix.Link for _, decl := range x["declarations"].([]interface{}) { - i.optJSON = nixOptionJSON{} switch decl := reflect.ValueOf(decl); decl.Kind() { case reflect.String: @@ -152,6 +151,7 @@ func (i *OptionIngester) Process(parent context.Context) (<-chan nix.Importable, x["declarations"] = decls } + i.optJSON = nixOptionJSON{} err := i.ms.Decode(x) // stores in optJSON if err != nil { errs <- errors.WithMessagef(err, "failed to decode option %#v", x) |