initial commit

This commit is contained in:
2024-11-28 23:38:39 +01:00
commit 5bcbe28ded
5 changed files with 422 additions and 0 deletions

11
json_ex/json.go Normal file
View File

@@ -0,0 +1,11 @@
package json_ex
import "encoding/json"
func GenericUnmarshal[T any](source []byte) (T, error) {
var target T
if err := json.Unmarshal(source, &target); err != nil {
return target, err
}
return target, nil
}