refactor: Fix linter errors by auto-apply
- Apply automated linter fixes - Manually reformat fields in model/service.go - Resolve code complexity issues
This commit is contained in:
@@ -26,6 +26,7 @@ func (c *PlainAuthController) Handler() gin.HandlerFunc {
|
||||
Send(ginCtx)
|
||||
if sendErr != nil {
|
||||
ginCtx.Writer.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
@@ -41,6 +42,7 @@ func (c *PlainAuthController) Handler() gin.HandlerFunc {
|
||||
Send(ginCtx)
|
||||
if sendErr != nil {
|
||||
ginCtx.Writer.WriteHeader(http.StatusInternalServerError)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -30,6 +30,7 @@ func (c *Controller) Handler() gin.HandlerFunc {
|
||||
_, err := ginCtx.Writer.Write([]byte("pong"))
|
||||
if err != nil {
|
||||
log.Global.Get(log.SERVER).Error(err)
|
||||
|
||||
return
|
||||
}
|
||||
}
|
||||
|
||||
@@ -23,6 +23,7 @@ func SetUserFromJWT() gin.HandlerFunc {
|
||||
subject, err := token.Claims.GetSubject()
|
||||
if err != nil {
|
||||
c.Writer.WriteHeader(http.StatusUnauthorized)
|
||||
|
||||
return
|
||||
}
|
||||
|
||||
|
||||
@@ -89,7 +89,6 @@ func Documentate() (*openapi3.Spec, error) {
|
||||
if err != nil {
|
||||
return nil, err
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return reflector.Spec, nil
|
||||
|
||||
Reference in New Issue
Block a user