@@ -150,6 +150,8 @@ func (dve DefaultValueEncoders) IntEncodeValue(ec EncodeContext, vw bsonrw.Value
150
150
}
151
151
152
152
// UintEncodeValue is the ValueEncoderFunc for uint types.
153
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
154
+ // future. Use UIntCodec.EncodeValue instead.
153
155
func (dve DefaultValueEncoders ) UintEncodeValue (ec EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
154
156
switch val .Kind () {
155
157
case reflect .Uint8 , reflect .Uint16 :
@@ -183,6 +185,8 @@ func (dve DefaultValueEncoders) FloatEncodeValue(ec EncodeContext, vw bsonrw.Val
183
185
}
184
186
185
187
// StringEncodeValue is the ValueEncoderFunc for string types.
188
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
189
+ // future. Use StringCodec.EncodeValue instead.
186
190
func (dve DefaultValueEncoders ) StringEncodeValue (ectx EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
187
191
if val .Kind () != reflect .String {
188
192
return ValueEncoderError {
@@ -241,6 +245,8 @@ func (dve DefaultValueEncoders) URLEncodeValue(ec EncodeContext, vw bsonrw.Value
241
245
}
242
246
243
247
// TimeEncodeValue is the ValueEncoderFunc for time.TIme.
248
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
249
+ // future. Use TimeCodec.EncodeValue instead.
244
250
func (dve DefaultValueEncoders ) TimeEncodeValue (ec EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
245
251
if ! val .IsValid () || val .Type () != tTime {
246
252
return ValueEncoderError {Name : "TimeEncodeValue" , Types : []reflect.Type {tTime }, Received : val }
@@ -250,6 +256,8 @@ func (dve DefaultValueEncoders) TimeEncodeValue(ec EncodeContext, vw bsonrw.Valu
250
256
}
251
257
252
258
// ByteSliceEncodeValue is the ValueEncoderFunc for []byte.
259
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
260
+ // future. Use ByteSliceCodec.EncodeValue instead.
253
261
func (dve DefaultValueEncoders ) ByteSliceEncodeValue (ec EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
254
262
if ! val .IsValid () || val .Type () != tByteSlice {
255
263
return ValueEncoderError {Name : "ByteSliceEncodeValue" , Types : []reflect.Type {tByteSlice }, Received : val }
@@ -261,6 +269,8 @@ func (dve DefaultValueEncoders) ByteSliceEncodeValue(ec EncodeContext, vw bsonrw
261
269
}
262
270
263
271
// MapEncodeValue is the ValueEncoderFunc for map[string]* types.
272
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
273
+ // future. Use MapCodec.EncodeValue instead.
264
274
func (dve DefaultValueEncoders ) MapEncodeValue (ec EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
265
275
if ! val .IsValid () || val .Kind () != reflect .Map || val .Type ().Key ().Kind () != reflect .String {
266
276
return ValueEncoderError {Name : "MapEncodeValue" , Kinds : []reflect.Kind {reflect .Map }, Received : val }
@@ -409,6 +419,8 @@ func (dve DefaultValueEncoders) ArrayEncodeValue(ec EncodeContext, vw bsonrw.Val
409
419
}
410
420
411
421
// SliceEncodeValue is the ValueEncoderFunc for slice types.
422
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
423
+ // future. Use SliceCodec.EncodeValue instead.
412
424
func (dve DefaultValueEncoders ) SliceEncodeValue (ec EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
413
425
if ! val .IsValid () || val .Kind () != reflect .Slice {
414
426
return ValueEncoderError {Name : "SliceEncodeValue" , Kinds : []reflect.Kind {reflect .Slice }, Received : val }
@@ -489,6 +501,8 @@ func (dve DefaultValueEncoders) lookupElementEncoder(ec EncodeContext, origEncod
489
501
}
490
502
491
503
// EmptyInterfaceEncodeValue is the ValueEncoderFunc for interface{}.
504
+ // This method is deprecated and does not have any stability guarantees. It may be removed in the
505
+ // future. Use EmptyInterfaceCodec.EncodeValue instead.
492
506
func (dve DefaultValueEncoders ) EmptyInterfaceEncodeValue (ec EncodeContext , vw bsonrw.ValueWriter , val reflect.Value ) error {
493
507
if ! val .IsValid () || val .Type () != tEmpty {
494
508
return ValueEncoderError {Name : "EmptyInterfaceEncodeValue" , Types : []reflect.Type {tEmpty }, Received : val }
0 commit comments