diff --git a/bfcodegen/csid-generate.template b/bfcodegen/csid-generate.template index b82aac0..9c1aa8b 100644 --- a/bfcodegen/csid-generate.template +++ b/bfcodegen/csid-generate.template @@ -167,11 +167,8 @@ func (id {{.Name}}) Valid() error { return validateID(prefix{{.Name}}, string(id)) } -func (i *{{.Name}}) String() string { - if i == nil { - return "" - } - return string(*i) +func (i {{.Name}}) String() string { + return string(i) } func (i {{.Name}}) Prefix() string { diff --git a/bfcodegen/enum-generate.template b/bfcodegen/enum-generate.template index ad5d1f4..ec6fbd8 100644 --- a/bfcodegen/enum-generate.template +++ b/bfcodegen/enum-generate.template @@ -69,11 +69,8 @@ func (e {{.EnumTypeName}}) ValuesMeta() []enums.EnumMetaValue { } {{if $hasStr}} -func (e *{{.EnumTypeName}}) String() string { - if e == nil { - return "" - } - return string(*e) +func (e {{.EnumTypeName}}) String() string { + return string(e) } {{end}} diff --git a/bfcodegen/id-generate.template b/bfcodegen/id-generate.template index 1b151e3..7111fe4 100644 --- a/bfcodegen/id-generate.template +++ b/bfcodegen/id-generate.template @@ -21,11 +21,8 @@ func (i {{.Name}}) MarshalBSONValue() (bsontype.Type, []byte, error) { } } -func (i *{{.Name}}) String() string { - if i == nil { - return "" - } - return string(*i) +func (i {{.Name}}) String() string { + return string(i) } func (i {{.Name}}) ObjID() (primitive.ObjectID, error) { diff --git a/goextVersion.go b/goextVersion.go index 0337b9b..30aaf75 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.535" +const GoextVersion = "0.0.536" -const GoextVersionTimestamp = "2024-10-22T09:41:59+0200" +const GoextVersionTimestamp = "2024-10-22T09:57:06+0200"