响应解析基于接口实现

This commit is contained in:
2025-05-07 15:48:36 +08:00
parent 088670c7d4
commit 741c9c8ea0
5 changed files with 193 additions and 94 deletions

View File

@ -0,0 +1,23 @@
// Package implement ...
//
// Description : implement ...
//
// Author : go_developer@163.com<白茶清欢>
//
// Date : 2025-05-07 14:53
package implement
import (
"git.zhangdeman.cn/zhangdeman/network/httpclient/abstract"
"git.zhangdeman.cn/zhangdeman/serialize"
)
// ResponseParserTable 响应数据解析器
var ResponseParserTable = map[string]abstract.IResponseParser{
"json": serialize.JSON,
"xml": serialize.Xml,
"yml": serialize.Yml,
"toml": serialize.Toml,
"yaml": serialize.Yml,
"text": serialize.JSON,
}