upda/util/json.go
Varakh 3532af74f2
All checks were successful
/ build (push) Successful in 3m37s
feat(actions): Add actions and secrets (with proper asynchronous enqueue and dequeue mechanism) (#22)
Reviewed-on: #22
Co-authored-by: Varakh <varakh@varakh.de>
Co-committed-by: Varakh <varakh@varakh.de>
2024-04-26 12:37:50 +00:00

8 lines
200 B
Go

package util
import "encoding/json"
// UnmarshalGenericJSON unmarshal JSON into given generic type T
func UnmarshalGenericJSON[T any](b []byte) (v T, err error) {
return v, json.Unmarshal(b, &v)
}