v0.0.589 improve Equal method of rfctime structs - prevents panic in cmp library
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m48s
Some checks failed
Build Docker and Deploy / Run goext test-suite (push) Failing after 1m48s
This commit is contained in:
parent
a4b2a0589f
commit
8ea9b3f79f
2
go.mod
2
go.mod
@ -38,7 +38,7 @@ require (
|
||||
github.com/google/uuid v1.5.0 // indirect
|
||||
github.com/json-iterator/go v1.1.12 // indirect
|
||||
github.com/klauspost/compress v1.18.0 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.2.11 // indirect
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 // indirect
|
||||
github.com/leodido/go-urn v1.4.0 // indirect
|
||||
github.com/mattn/go-colorable v0.1.14 // indirect
|
||||
github.com/mattn/go-isatty v0.0.20 // indirect
|
||||
|
2
go.sum
2
go.sum
@ -132,6 +132,8 @@ github.com/klauspost/cpuid/v2 v2.2.10 h1:tBs3QSyvjDyFTq3uoc/9xFpCuOsJQFNPiAhYdw2
|
||||
github.com/klauspost/cpuid/v2 v2.2.10/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/klauspost/cpuid/v2 v2.2.11 h1:0OwqZRYI2rFrjS4kvkDnqJkKHdHaRnCm68/DY4OxRzU=
|
||||
github.com/klauspost/cpuid/v2 v2.2.11/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0 h1:S4CRMLnYUhGeDFDqkGriYKdfoFlDnMtqTiI/sFzhA9Y=
|
||||
github.com/klauspost/cpuid/v2 v2.3.0/go.mod h1:hqwkgyIinND0mEev00jJYCxPNVRVXFQeu1XKlok6oO0=
|
||||
github.com/knz/go-libedit v1.10.1/go.mod h1:MZTVkCWyz0oBc7JOWP3wNAzd002ZbM/5hgShxwh4x8M=
|
||||
github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ=
|
||||
github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI=
|
||||
|
@ -1,5 +1,5 @@
|
||||
package goext
|
||||
|
||||
const GoextVersion = "0.0.588"
|
||||
const GoextVersion = "0.0.589"
|
||||
|
||||
const GoextVersionTimestamp = "2025-07-11T11:50:29+0200"
|
||||
const GoextVersionTimestamp = "2025-07-15T13:46:36+0200"
|
||||
|
@ -4,11 +4,11 @@ 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"
|
||||
"go.mongodb.org/mongo-driver/bson/bsontype"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"reflect"
|
||||
"time"
|
||||
)
|
||||
@ -142,7 +142,13 @@ func (t RFC3339Time) Before(u AnyTime) bool {
|
||||
return t.Time().Before(tt(u))
|
||||
}
|
||||
|
||||
func (t RFC3339Time) Equal(u AnyTime) bool {
|
||||
func (t *RFC3339Time) Equal(u AnyTime) bool {
|
||||
if t == nil && u == nil {
|
||||
return true
|
||||
}
|
||||
if t == nil || u == nil {
|
||||
return false
|
||||
}
|
||||
return t.Time().Equal(tt(u))
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,11 @@ 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"
|
||||
"go.mongodb.org/mongo-driver/bson/bsontype"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"reflect"
|
||||
"time"
|
||||
)
|
||||
@ -142,7 +142,13 @@ func (t RFC3339NanoTime) Before(u AnyTime) bool {
|
||||
return t.Time().Before(tt(u))
|
||||
}
|
||||
|
||||
func (t RFC3339NanoTime) Equal(u AnyTime) bool {
|
||||
func (t *RFC3339NanoTime) Equal(u AnyTime) bool {
|
||||
if t == nil && u == nil {
|
||||
return true
|
||||
}
|
||||
if t == nil || u == nil {
|
||||
return false
|
||||
}
|
||||
return t.Time().Equal(tt(u))
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,11 @@ 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"
|
||||
"go.mongodb.org/mongo-driver/bson/bsontype"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -136,7 +136,13 @@ func (t UnixTime) Before(u AnyTime) bool {
|
||||
return t.Time().Before(tt(u))
|
||||
}
|
||||
|
||||
func (t UnixTime) Equal(u AnyTime) bool {
|
||||
func (t *UnixTime) Equal(u AnyTime) bool {
|
||||
if t == nil && u == nil {
|
||||
return true
|
||||
}
|
||||
if t == nil || u == nil {
|
||||
return false
|
||||
}
|
||||
return t.Time().Equal(tt(u))
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,11 @@ 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"
|
||||
"go.mongodb.org/mongo-driver/bson/bsontype"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -136,7 +136,13 @@ func (t UnixMilliTime) Before(u AnyTime) bool {
|
||||
return t.Time().Before(tt(u))
|
||||
}
|
||||
|
||||
func (t UnixMilliTime) Equal(u AnyTime) bool {
|
||||
func (t *UnixMilliTime) Equal(u AnyTime) bool {
|
||||
if t == nil && u == nil {
|
||||
return true
|
||||
}
|
||||
if t == nil || u == nil {
|
||||
return false
|
||||
}
|
||||
return t.Time().Equal(tt(u))
|
||||
}
|
||||
|
||||
|
@ -4,11 +4,11 @@ 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"
|
||||
"go.mongodb.org/mongo-driver/bson/bsontype"
|
||||
"git.blackforestbytes.com/BlackForestBytes/goext/langext"
|
||||
"reflect"
|
||||
"strconv"
|
||||
"time"
|
||||
@ -136,7 +136,13 @@ func (t UnixNanoTime) Before(u AnyTime) bool {
|
||||
return t.Time().Before(tt(u))
|
||||
}
|
||||
|
||||
func (t UnixNanoTime) Equal(u AnyTime) bool {
|
||||
func (t *UnixNanoTime) Equal(u AnyTime) bool {
|
||||
if t == nil && u == nil {
|
||||
return true
|
||||
}
|
||||
if t == nil || u == nil {
|
||||
return false
|
||||
}
|
||||
return t.Time().Equal(tt(u))
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user