updated dependencies and go

This commit is contained in:
2026-04-21 11:06:01 +02:00
parent f62e7499ec
commit 84b87d61f2
91 changed files with 551 additions and 637 deletions
+4 -5
View File
@@ -4,7 +4,6 @@ import (
"encoding/json"
"errors"
"fmt"
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
"go.mongodb.org/mongo-driver/bson"
"go.mongodb.org/mongo-driver/bson/bsoncodec"
"go.mongodb.org/mongo-driver/bson/bsonrw"
@@ -93,7 +92,7 @@ func (t UnixNanoTime) MarshalBSONValue() (bsontype.Type, []byte, error) {
}
func (t UnixNanoTime) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueReader, val reflect.Value) error {
if val.Kind() == reflect.Ptr && val.IsNil() {
if val.Kind() == reflect.Pointer && val.IsNil() {
if !val.CanSet() {
return errors.New("ValueUnmarshalerDecodeValue")
}
@@ -105,7 +104,7 @@ func (t UnixNanoTime) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueRea
return err
}
if val.Kind() == reflect.Ptr && len(src) == 0 {
if val.Kind() == reflect.Pointer && len(src) == 0 {
val.Set(reflect.Zero(val.Type()))
return nil
}
@@ -115,7 +114,7 @@ func (t UnixNanoTime) DecodeValue(dc bsoncodec.DecodeContext, vr bsonrw.ValueRea
return err
}
if val.Kind() == reflect.Ptr {
if val.Kind() == reflect.Pointer {
val.Set(reflect.ValueOf(&t))
} else {
val.Set(reflect.ValueOf(t))
@@ -251,7 +250,7 @@ func NewUnixNanoPtr(t *time.Time) *UnixNanoTime {
if t == nil {
return nil
}
return langext.Ptr(UnixNanoTime(*t))
return new(UnixNanoTime(*t))
}
func NowUnixNano() UnixNanoTime {