Skip to content

Commit

Permalink
fix: lint error
Browse files Browse the repository at this point in the history
  • Loading branch information
golangboy authored and jakezhu9 committed Feb 23, 2024
1 parent 6ff6deb commit 408046f
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 5 deletions.
6 changes: 4 additions & 2 deletions config/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down
1 change: 0 additions & 1 deletion handler/admin/link.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion handler/admin/menu.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down
1 change: 0 additions & 1 deletion handler/admin/tag.go
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 408046f

Please sign in to comment.