File tree Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Expand file tree Collapse file tree 1 file changed +8
-2
lines changed Original file line number Diff line number Diff line change @@ -14,7 +14,6 @@ import (
1414
1515// DNSReferenceRefScriptDatum represents the auto-discovery datum type for scripts that handle DNS records
1616type DNSReferenceRefScriptDatum struct {
17- // This allows the type to be used with cbor.DecodeGeneric
1817 cbor.StructAsArray
1918 TldName []byte
2019 SymbolDrat []byte
@@ -56,5 +55,12 @@ func (d *DNSReferenceRefScriptDatum) UnmarshalCBOR(cborData []byte) error {
5655 tmpDataInner .Constructor (),
5756 )
5857 }
59- return cbor .DecodeGeneric (tmpDataInner .FieldsCbor (), d )
58+ // Decode constr field data without using our custom decode function
59+ type tDNSReferenceRefScriptDatum DNSReferenceRefScriptDatum
60+ var tmpScriptDatum tDNSReferenceRefScriptDatum
61+ if _ , err := cbor .Decode (tmpDataInner .FieldsCbor (), & tmpScriptDatum ); err != nil {
62+ return err
63+ }
64+ * d = DNSReferenceRefScriptDatum (tmpScriptDatum )
65+ return nil
6066}
You can’t perform that action at this time.
0 commit comments