v0.0.580 Add IsZero() to generated ID types
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m33s

This commit is contained in:
2025-06-16 08:40:07 +02:00
parent 073aa84dd4
commit 2a0cf84416
5 changed files with 13 additions and 3 deletions

View File

@@ -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())
}