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 (
var logMode LogMode mode string
logMode LogMode
)
func IsDev() bool { func IsDev() bool {
return mode == "development" return mode == "development"

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

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

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

Loading…
Cancel
Save