代码拉取完成,页面将自动刷新
package gin
import (
"gitee.com/linxing_3/youye-core/sdk/pkg/response"
"github.com/gin-gonic/gin"
)
var _ response.IRespWriter = (*GinWriter)(nil)
func NewGinRespWriter(gin *gin.Context) *GinWriter {
return &GinWriter{gin: gin}
}
type GinWriter struct {
gin *gin.Context
}
// AbortWithStatusJSON implements response.IRespWriter.
func (g *GinWriter) AbortWithStatusJSON(code int, obj any) {
g.gin.AbortWithStatusJSON(code, obj)
}
// Get implements response.IRespWriter.
func (g *GinWriter) Get(key string) (val any, exists bool) {
return g.gin.Get(key)
}
// GetHeader implements response.IRespWriter.
func (g *GinWriter) GetHeader(key string) string {
return g.gin.GetHeader(key)
}
// Set implements response.IRespWriter.
func (g *GinWriter) Set(key string, val any) {
g.gin.Set(key, val)
}
// SetHeader implements response.IRespWriter.
func (g *GinWriter) SetHeader(key string, val string) {
g.gin.Header(key, val)
}
此处可能存在不合适展示的内容,页面不予展示。您可通过相关编辑功能自查并修改。
如您确认内容无涉及 不当用语 / 纯广告导流 / 暴力 / 低俗色情 / 侵权 / 盗版 / 虚假 / 无价值内容或违法国家有关法律法规的内容,可点击提交进行申诉,我们将尽快为您处理。