21
0
Fork 0

v0.0.264 added Valid() to id-gen
Build Docker and Deploy / Run goext test-suite (push) Successful in 49s Details

This commit is contained in:
Mike Schwörer 2023-09-18 11:46:17 +02:00
parent 3d4afe7b25
commit da52bb5c90
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 9 additions and 2 deletions

View File

@ -209,6 +209,13 @@ func fmtIDOutput(cs string, ids []IDDef, pkgname string) string {
str += "" + "\n"
str += "func (i " + iddef.Name + ") Valid() bool {" + "\n"
str += " _, err := primitive.ObjectIDFromHex(string(i))" + "\n"
str += " return err == nil" + "\n"
str += "}" + "\n"
str += "" + "\n"
if anyDef != nil {
str += "func (i " + iddef.Name + ") AsAny() " + anyDef.Name + " {" + "\n"
str += " return " + anyDef.Name + "(i)" + "\n"

View File

@ -1,5 +1,5 @@
package goext
const GoextVersion = "0.0.263"
const GoextVersion = "0.0.264"
const GoextVersionTimestamp = "2023-09-18T10:43:29+0200"
const GoextVersionTimestamp = "2023-09-18T11:46:17+0200"