This commit is contained in:
Mrx
2026-05-29 20:13:12 +08:00
parent 2a174e49e5
commit 4b1176b1e3
17 changed files with 31 additions and 16 deletions

View File

@@ -0,0 +1,15 @@
package processors
import (
"encoding/json"
"errors"
)
// MarshalRawResponse 将上游原始响应数据序列化后返回(格式不符合预期时使用)。
func MarshalRawResponse(data interface{}) ([]byte, error) {
respBytes, err := json.Marshal(data)
if err != nil {
return nil, errors.Join(ErrSystem, err)
}
return respBytes, nil
}