Update dsd loading to new version
This commit is contained in:
@@ -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
|
// JSON, BSON or GenCode. So LoadAsFormat MUST return the value
|
||||||
// passed as the third parameter. String or RAW encoding IS AN
|
// passed as the third parameter. String or RAW encoding IS AN
|
||||||
// error here.
|
// error here.
|
||||||
val, err := dsd.LoadAsFormat(blob, format, &listEntry{})
|
entry := &listEntry{}
|
||||||
|
err := dsd.LoadAsFormat(blob, format, entry)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return fmt.Errorf("failed to decoded DSD encoded entity: %w", err)
|
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 {
|
select {
|
||||||
case ch <- entry:
|
case ch <- entry:
|
||||||
|
|||||||
Reference in New Issue
Block a user