From 8a92a6cc525f0d4d11518bbcc2c328ff07b465a7 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Mike=20Schw=C3=B6rer?= Date: Thu, 7 Nov 2024 13:13:12 +0100 Subject: [PATCH] v0.0.542 --- dataext/optional.go | 8 ++++++++ goextVersion.go | 4 ++-- 2 files changed, 10 insertions(+), 2 deletions(-) diff --git a/dataext/optional.go b/dataext/optional.go index 1f33ab4..b0af247 100644 --- a/dataext/optional.go +++ b/dataext/optional.go @@ -10,6 +10,14 @@ type JsonOpt[T any] struct { value T } +func NewJsonOpt[T any](v T) JsonOpt[T] { + return JsonOpt[T]{isSet: true, value: v} +} + +func EmptyJsonOpt[T any]() JsonOpt[T] { + return JsonOpt[T]{isSet: false} +} + // MarshalJSON returns m as the JSON encoding of m. func (m JsonOpt[T]) MarshalJSON() ([]byte, error) { if !m.isSet { diff --git a/goextVersion.go b/goextVersion.go index ddee908..e9acaa5 100644 --- a/goextVersion.go +++ b/goextVersion.go @@ -1,5 +1,5 @@ package goext -const GoextVersion = "0.0.541" +const GoextVersion = "0.0.542" -const GoextVersionTimestamp = "2024-11-05T14:38:42+0100" +const GoextVersionTimestamp = "2024-11-07T13:13:12+0100"