File tree Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Expand file tree Collapse file tree 2 files changed +6
-6
lines changed Original file line number Diff line number Diff line change @@ -21,15 +21,15 @@ const (
21
21
IPAddressStr = "IP-Address"
22
22
)
23
23
24
- func GetAsString (ctx context.Context , key ContextKey ) string {
24
+ func GetAsString (ctx context.Context , key any ) string {
25
25
val , ok := ctx .Value (key ).(string )
26
26
if ok {
27
27
return val
28
28
}
29
29
return ""
30
30
}
31
31
32
- func GetCtxValue (ctx context.Context , key ContextKey ) any {
32
+ func GetCtxValue (ctx context.Context , key any ) any {
33
33
return ctx .Value (key )
34
34
}
35
35
Original file line number Diff line number Diff line change @@ -12,10 +12,10 @@ func SetLogger(next echo.HandlerFunc) echo.HandlerFunc {
12
12
return func (c echo.Context ) error {
13
13
// get request's context
14
14
ctx := c .Request ().Context ()
15
- ipAddress , _ := keys .GetAsString (ctx , keys .IPAddressStr )
16
- identityID , _ := keys .GetAsString (ctx , keys .IdentityID )
17
- requestID , _ := keys .GetAsString (ctx , keys .RequestID )
18
- msgID , _ := keys .GetAsString (ctx , keys .MSGID )
15
+ ipAddress := keys .GetAsString (ctx , keys .IPAddressStr )
16
+ identityID := keys .GetAsString (ctx , keys .IdentityID )
17
+ requestID := keys .GetAsString (ctx , keys .RequestID )
18
+ msgID := keys .GetAsString (ctx , keys .MSGID )
19
19
20
20
logInfo := logger.ServiceContext {
21
21
Service : verser .GetService (),
You can’t perform that action at this time.
0 commit comments