v0.0.542
All checks were successful
Build Docker and Deploy / Run goext test-suite (push) Successful in 2m9s

This commit is contained in:
Mike Schwörer 2024-11-07 13:13:12 +01:00
parent 9b2028ab54
commit 8a92a6cc52
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
2 changed files with 10 additions and 2 deletions

View File

@ -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 {

View File

@ -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"