mirror of
https://github.com/openimsdk/open-im-server.git
synced 2026-05-14 14:05:59 +08:00
zap
This commit is contained in:
@@ -54,6 +54,16 @@ func GetOpUserID(ctx context.Context) string {
|
||||
return ""
|
||||
}
|
||||
|
||||
func GetConnID(ctx context.Context) string {
|
||||
if ctx.Value(constant.ConnID) != "" {
|
||||
s, ok := ctx.Value(constant.ConnID).(string)
|
||||
if ok {
|
||||
return s
|
||||
}
|
||||
}
|
||||
return ""
|
||||
}
|
||||
|
||||
func Unwrap(err error) error {
|
||||
for err != nil {
|
||||
unwrap, ok := err.(interface {
|
||||
|
||||
Reference in New Issue
Block a user