Prepare for v3

This commit is contained in:
2023-06-10 00:44:20 +02:00
parent 7c3e50e783
commit 23029ae710
42 changed files with 880 additions and 719 deletions
+16
View File
@@ -0,0 +1,16 @@
package ifacebased
import (
"github.com/mainnika/mongox-go-driver/v2/mongox"
"github.com/modern-go/reflect2"
)
// GetID returns an _id from the source document
func GetID(source mongox.InterfaceBased) (id interface{}, err error) {
id = source.GetID()
if !reflect2.IsNil(id) {
return id, nil
}
return nil, mongox.ErrUninitializedBase
}