From 9b9a79b4adb846a9d0e5bb22db833d0341866629 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Tue, 22 Oct 2024 09:57:06 +0200 Subject: [PATCH] v0.0.536 revert bfcodegen changes --- bfcodegen/csid-generate.template | 7 ++----- bfcodegen/enum-generate.template | 7 ++----- bfcodegen/id-generate.template | 7 ++----- goextVersion.go | 4 ++-- 4 files changed, 8 insertions(+), 17 deletions(-) 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"