v0.0.533 Made String() functions in bfcodegen nil-ptr safe
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m9s

This commit is contained in:
2024-10-22 09:36:40 +02:00
parent e884ba6b89
commit c571f3f888
6 changed files with 20 additions and 7 deletions

View File

@@ -21,7 +21,10 @@ func (i {{.Name}}) MarshalBSONValue() (bsontype.Type, []byte, error) {
}
}
func (i {{.Name}}) String() string {
func (i *{{.Name}}) String() string {
if i == nil {
return "<nil>"
}
return string(i)
}