mirror of
https://github.com/Buriburizaem0n/nezha_domains.git
synced 2026-02-04 04:30:05 +00:00
fix: struct tag (#932)
* fix: struct tag * fix: struct tag * fix: strings conversion * do not write anything after redirection * fix table * fix select
This commit is contained in:
@@ -197,6 +197,8 @@ func (we *wsError) Error() string {
|
||||
return fmt.Sprintf(we.msg, we.a...)
|
||||
}
|
||||
|
||||
var errNoop = errors.New("wrote")
|
||||
|
||||
func commonHandler[T any](handler handlerFunc[T]) func(*gin.Context) {
|
||||
return func(c *gin.Context) {
|
||||
handle(c, handler)
|
||||
@@ -239,7 +241,9 @@ func handle[T any](c *gin.Context, handler handlerFunc[T]) {
|
||||
}
|
||||
return
|
||||
default:
|
||||
c.JSON(http.StatusOK, newErrorResponse(err))
|
||||
if !errors.Is(err, errNoop) {
|
||||
c.JSON(http.StatusOK, newErrorResponse(err))
|
||||
}
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user