fix: lint error

pull/393/head
golangboy 11 months ago committed by Junxing Zhu
parent 6ff6debe24
commit 408046f8b5

@ -104,8 +104,10 @@ func initDirectory(conf *Config) {
}
}
var mode string
var logMode LogMode
var (
mode string
logMode LogMode
)
func IsDev() bool {
return mode == "development"

@ -78,7 +78,6 @@ func (l *LinkHandler) UpdateLink(ctx *gin.Context) (interface{}, error) {
}
linkParam := &param.Link{}
err = ctx.ShouldBindJSON(linkParam)
if err != nil {
e := validator.ValidationErrors{}
if errors.As(err, &e) {

@ -136,7 +136,6 @@ func (m *MenuHandler) UpdateMenu(ctx *gin.Context) (interface{}, error) {
}
menuParam := &param.Menu{}
err = ctx.ShouldBindJSON(menuParam)
if err != nil {
e := validator.ValidationErrors{}
if errors.As(err, &e) {

@ -81,7 +81,6 @@ func (t *TagHandler) UpdateTag(ctx *gin.Context) (interface{}, error) {
}
tagParam := &param.Tag{}
err = ctx.ShouldBindJSON(tagParam)
if err != nil {
e := validator.ValidationErrors{}
if errors.As(err, &e) {

Loading…
Cancel
Save