We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 97310f8 commit 57d0301Copy full SHA for 57d0301
routers/routes/gin.go
@@ -30,11 +30,10 @@ type routerLoggerOptions struct {
30
// FIXME currently no any data stored on gin.Context but macaron.Context, so this will
31
// return "" before we remove macaron totally
32
func SignedUserName(ctx *gin.Context) string {
33
- if v, ok := ctx.Get("SignedUserName"); !ok {
34
- return ""
35
- } else {
+ if v, ok := ctx.Get("SignedUserName"); ok {
36
return v.(string)
37
}
+ return ""
38
39
40
func setupAccessLogger(g *gin.Engine) {
0 commit comments