mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2026-01-06 11:54:25 +00:00
Update pkg/logger/logger.go
Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
This commit is contained in:
committed by
GitHub
parent
8adc386863
commit
bc2fdc143b
@@ -84,12 +84,15 @@ func extractContext(args ...interface{}) (context.Context, []interface{}) {
|
|||||||
found := false
|
found := false
|
||||||
|
|
||||||
for _, arg := range args {
|
for _, arg := range args {
|
||||||
if c, ok := arg.(context.Context); ok && !found {
|
if c, ok := arg.(context.Context); ok {
|
||||||
ctx = c
|
if !found {
|
||||||
found = true
|
ctx = c
|
||||||
} else {
|
found = true
|
||||||
newArgs = append(newArgs, arg)
|
}
|
||||||
|
// Ignore any additional context.Context arguments after the first one.
|
||||||
|
continue
|
||||||
}
|
}
|
||||||
|
newArgs = append(newArgs, arg)
|
||||||
}
|
}
|
||||||
return ctx, newArgs
|
return ctx, newArgs
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user