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

@@ -69,7 +69,10 @@ func (e {{.EnumTypeName}}) ValuesMeta() []enums.EnumMetaValue {
}
{{if $hasStr}}
func (e {{.EnumTypeName}}) String() string {
func (e *{{.EnumTypeName}}) String() string {
if i == nil {
return "<nil>"
}
return string(e)
}
{{end}}