Skip to content

Commit

Permalink
fix lint
Browse files Browse the repository at this point in the history
  • Loading branch information
lunny committed Jul 9, 2019
1 parent 97310f8 commit 57d0301
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions routers/routes/gin.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,11 +30,10 @@ type routerLoggerOptions struct {
// FIXME currently no any data stored on gin.Context but macaron.Context, so this will
// return "" before we remove macaron totally
func SignedUserName(ctx *gin.Context) string {
if v, ok := ctx.Get("SignedUserName"); !ok {
return ""
} else {
if v, ok := ctx.Get("SignedUserName"); ok {
return v.(string)
}
return ""
}

func setupAccessLogger(g *gin.Engine) {
Expand Down

0 comments on commit 57d0301

Please sign in to comment.