Add utility methods for handling queue handler results and payload mapping
This commit is contained in:
+1
-1
@@ -22,7 +22,7 @@ func StructToMap(data interface{}) (JSONB, error) {
|
||||
return result, nil
|
||||
}
|
||||
|
||||
func MapToStruct(data JSONB, result interface{}) error {
|
||||
func MapToStruct(data JSONB, result any) error {
|
||||
// Marshal map to JSON bytes
|
||||
jsonBytes, err := json.Marshal(data)
|
||||
if err != nil {
|
||||
|
||||
Reference in New Issue
Block a user