21
0
Fork 0

v0.0.430
Build Docker and Deploy / Run goext test-suite (push) Has been cancelled Details

This commit is contained in:
Mike Schwörer 2024-04-10 15:27:41 +02:00
parent 24d9f0fdc7
commit 6602f86b43
Signed by: Mikescher
GPG Key ID: D3C7172E0A70F8CF
4 changed files with 29 additions and 3 deletions

2
go.mod
View File

@ -28,7 +28,7 @@ require (
github.com/golang/snappy v0.0.4 // indirect
github.com/google/uuid v1.5.0 // indirect
github.com/json-iterator/go v1.1.12 // indirect
github.com/klauspost/compress v1.17.7 // indirect
github.com/klauspost/compress v1.17.8 // indirect
github.com/klauspost/cpuid/v2 v2.2.7 // indirect
github.com/leodido/go-urn v1.4.0 // indirect
github.com/mattn/go-colorable v0.1.13 // indirect

2
go.sum
View File

@ -73,6 +73,8 @@ github.com/klauspost/compress v1.17.6 h1:60eq2E/jlfwQXtvZEeBUYADs+BwKBWURIY+Gj2e
github.com/klauspost/compress v1.17.6/go.mod h1:/dCuZOvVtNoHsyb+cuJD3itjs3NbnF6KH9zAO4BDxPM=
github.com/klauspost/compress v1.17.7 h1:ehO88t2UGzQK66LMdE8tibEd1ErmzZjNEqWkjLAKQQg=
github.com/klauspost/compress v1.17.7/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/compress v1.17.8 h1:YcnTYrq7MikUT7k0Yb5eceMmALQPYBW/Xltxn0NAMnU=
github.com/klauspost/compress v1.17.8/go.mod h1:Di0epgTjJY877eYKx5yC51cX2A2Vl2ibi7bDH9ttBbw=
github.com/klauspost/cpuid/v2 v2.0.9/go.mod h1:FInQzS24/EEf25PyTYn52gqo7WaD8xa0213Md/qVLRg=
github.com/klauspost/cpuid/v2 v2.2.6 h1:ndNyv040zDGIDh8thGkXYjnFtiN02M1PVVF+JE/48xc=
github.com/klauspost/cpuid/v2 v2.2.6/go.mod h1:Lcz8mBdAVJIBVzewtcLocK12l3Y+JytZYpaMropDUws=

View File

@ -1,5 +1,5 @@
package goext
const GoextVersion = "0.0.429"
const GoextVersion = "0.0.430"
const GoextVersionTimestamp = "2024-04-08T16:33:44+0200"
const GoextVersionTimestamp = "2024-04-10T15:27:41+0200"

View File

@ -63,3 +63,27 @@ func PatchRemJson[JV string | []byte](rawjson JV, key string) (JV, error) {
return JV(newjson), nil
}
func MarshalJsonOrPanic(v any) string {
bin, err := json.Marshal(v)
if err != nil {
panic(err)
}
return string(bin)
}
func MarshalJsonOrDefault(v any, def string) string {
bin, err := json.Marshal(v)
if err != nil {
return def
}
return string(bin)
}
func MarshalJsonOrNil(v any) *string {
bin, err := json.Marshal(v)
if err != nil {
return nil
}
return Ptr(string(bin))
}