Skip to content

Commit 57d0301

Browse files
committed
fix lint
1 parent 97310f8 commit 57d0301

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

routers/routes/gin.go

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -30,11 +30,10 @@ type routerLoggerOptions struct {
3030
// FIXME currently no any data stored on gin.Context but macaron.Context, so this will
3131
// return "" before we remove macaron totally
3232
func SignedUserName(ctx *gin.Context) string {
33-
if v, ok := ctx.Get("SignedUserName"); !ok {
34-
return ""
35-
} else {
33+
if v, ok := ctx.Get("SignedUserName"); ok {
3634
return v.(string)
3735
}
36+
return ""
3837
}
3938

4039
func setupAccessLogger(g *gin.Engine) {

0 commit comments

Comments
 (0)