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
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m33s
This commit is contained in:
@@ -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())
|
||||
}
|
||||
|
Reference in New Issue
Block a user