diff --git a/intel/filterlists/decoder.go b/intel/filterlists/decoder.go index 3e9c54b0..c2be0f7e 100644 --- a/intel/filterlists/decoder.go +++ b/intel/filterlists/decoder.go @@ -83,14 +83,11 @@ func decodeFile(ctx context.Context, r io.Reader, ch chan<- *listEntry) error { // JSON, BSON or GenCode. So LoadAsFormat MUST return the value // passed as the third parameter. String or RAW encoding IS AN // error here. - val, err := dsd.LoadAsFormat(blob, format, &listEntry{}) + entry := &listEntry{} + err := dsd.LoadAsFormat(blob, format, entry) if err != nil { return fmt.Errorf("failed to decoded DSD encoded entity: %w", err) } - entry, ok := val.(*listEntry) - if !ok { - return fmt.Errorf("unsupported encoding format: %d (%c)", format, format) - } select { case ch <- entry: