diff --git a/bfcodegen/csid-generate.template b/bfcodegen/csid-generate.template index 91cf521..c8105a4 100644 --- a/bfcodegen/csid-generate.template +++ b/bfcodegen/csid-generate.template @@ -183,6 +183,10 @@ func (id {{.Name}}) CheckString() string { return getCheckString(prefix{{.Name}}, string(id)) } +func (id {{.Name}}) IsZero() bool { + return id == "" +} + func (id {{.Name}}) Regex() rext.Regex { return regex{{.Name}} } diff --git a/bfcodegen/id-generate.template b/bfcodegen/id-generate.template index b30514a..6d9af2e 100644 --- a/bfcodegen/id-generate.template +++ b/bfcodegen/id-generate.template @@ -45,6 +45,10 @@ func (i {{.Name}}) AsAnyPtr() *{{$.AnyDef.Name}} { } {{end}} +func (i {{.Name}}) IsZero() bool { + return i == "" +} + func New{{.Name}}() {{.Name}} { return {{.Name}}(primitive.NewObjectID().Hex()) } diff --git a/go.mod b/go.mod index 02505df..c076eff 100644 --- a/go.mod +++ b/go.mod @@ -48,7 +48,7 @@ require ( github.com/pelletier/go-toml/v2 v2.2.4 // indirect github.com/remyoudompheng/bigfft v0.0.0-20230129092748-24d4a6f8daec // indirect github.com/twitchyliquid64/golang-asm v0.15.1 // indirect - github.com/ugorji/go/codec v1.2.14 // indirect + github.com/ugorji/go/codec v1.3.0 // indirect github.com/xdg-go/pbkdf2 v1.0.0 // indirect github.com/xdg-go/scram v1.1.2 // indirect github.com/xdg-go/stringprep v1.0.4 // indirect diff --git a/go.sum b/go.sum index 5470cda..fa0a744 100644 --- a/go.sum +++ b/go.sum @@ -187,6 +187,8 @@ github.com/ugorji/go/codec v1.2.12 h1:9LC83zGrHhuUA9l16C9AHXAqEV/2wBQ4nkvumAE65E github.com/ugorji/go/codec v1.2.12/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= github.com/ugorji/go/codec v1.2.14 h1:yOQvXCBc3Ij46LRkRoh4Yd5qK6LVOgi0bYOXfb7ifjw= github.com/ugorji/go/codec v1.2.14/go.mod h1:UNopzCgEMSXjBc6AOMqYvWC1ktqTAfzJZUZgYf6w6lg= +github.com/ugorji/go/codec v1.3.0 h1:Qd2W2sQawAfG8XSvzwhBeoGq71zXOC/Q1E9y/wUcsUA= +github.com/ugorji/go/codec v1.3.0/go.mod h1:pRBVtBSKl77K30Bv8R2P+cLSGaTtex6fsA2Wjqmfxj4= github.com/xdg-go/pbkdf2 v1.0.0 h1:Su7DPu48wXMwC3bs7MCNG+z4FhcyEuz5dlvchbq0B0c= github.com/xdg-go/pbkdf2 v1.0.0/go.mod h1:jrpuAogTd400dnrH08LKmI/xc1MbPOebTwRqcT5RDeI= github.com/xdg-go/scram v1.1.2 h1:FHX5I5B4i4hKRVRBCFRxq1iQRej7WO3hhBuJf+UUySY= diff --git a/goextVersion.go b/goextVersion.go index 124bd1c..e0a40f2 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.579" +const GoextVersion = "0.0.580" -const GoextVersionTimestamp = "2025-06-13T16:53:24+0200" +const GoextVersionTimestamp = "2025-06-16T08:40:07+0200"