diff --git a/lib/debezium/decimal.go b/lib/debezium/decimal.go index c7c4aecad..0b3c9a931 100644 --- a/lib/debezium/decimal.go +++ b/lib/debezium/decimal.go @@ -88,7 +88,7 @@ func decimalWithNewExponent(decimal *apd.Decimal, newExponent int32) *apd.Decima } } -// EncodeDecimal is used to encode a [*apd.Decimal] to [org.apache.kafka.connect.data.Decimal]. +// EncodeDecimal is used to encode a [*apd.Decimal] to `org.apache.kafka.connect.data.Decimal`. // The scale of the value (which is the negated exponent of the decimal) is returned as the second argument. func EncodeDecimal(decimal *apd.Decimal) ([]byte, int32) { bigIntValue := decimal.Coeff.MathBigInt() @@ -99,7 +99,7 @@ func EncodeDecimal(decimal *apd.Decimal) ([]byte, int32) { return encodeBigInt(bigIntValue), -decimal.Exponent } -// EncodeDecimalWithScale is used to encode a [*apd.Decimal] to [org.apache.kafka.connect.data.Decimal] +// EncodeDecimalWithScale is used to encode a [*apd.Decimal] to `org.apache.kafka.connect.data.Decimal` // using a specific scale. func EncodeDecimalWithScale(decimal *apd.Decimal, scale int32) []byte { targetExponent := -scale // Negate scale since [Decimal.Exponent] is negative. @@ -110,7 +110,7 @@ func EncodeDecimalWithScale(decimal *apd.Decimal, scale int32) []byte { return bytes } -// DecodeDecimal is used to decode [org.apache.kafka.connect.data.Decimal]. +// DecodeDecimal is used to decode `org.apache.kafka.connect.data.Decimal`. func DecodeDecimal(data []byte, scale int32) *apd.Decimal { return apd.NewWithBigInt(new(apd.BigInt).SetMathBigInt(decodeBigInt(data)), -scale) }