mirror of
https://github.com/safing/portmaster
synced 2025-09-01 18:19:12 +00:00
Use new(record.Meta) instead of a dedicated call to SetMeta
This commit is contained in:
parent
c2d2064ec8
commit
e21eb16a6b
1 changed files with 2 additions and 2 deletions
|
@ -66,12 +66,12 @@ func (runner *RuntimeQueryRunner) get(keyOrPrefix string) ([]record.Record, erro
|
|||
return nil, fmt.Errorf("failed to marshal result: %w", err)
|
||||
}
|
||||
|
||||
// construct a new record wrapper that uses the already prepared JSON blob.
|
||||
key := fmt.Sprintf("%s:%s", runner.reg.DatabaseName(), keyOrPrefix)
|
||||
wrapper, err := record.NewWrapper(key, nil, dsd.JSON, blob)
|
||||
wrapper, err := record.NewWrapper(key, new(record.Meta), dsd.JSON, blob)
|
||||
if err != nil {
|
||||
return nil, fmt.Errorf("failed to create record wrapper: %w", err)
|
||||
}
|
||||
wrapper.SetMeta(new(record.Meta))
|
||||
|
||||
return []record.Record{wrapper}, nil
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue