mirror of
https://github.com/bitechdev/ResolveSpec.git
synced 2025-12-31 08:44: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
|
||||
|
||||
for _, arg := range args {
|
||||
if c, ok := arg.(context.Context); ok && !found {
|
||||
ctx = c
|
||||
found = true
|
||||
} else {
|
||||
newArgs = append(newArgs, arg)
|
||||
if c, ok := arg.(context.Context); ok {
|
||||
if !found {
|
||||
ctx = c
|
||||
found = true
|
||||
}
|
||||
// Ignore any additional context.Context arguments after the first one.
|
||||
continue
|
||||
}
|
||||
newArgs = append(newArgs, arg)
|
||||
}
|
||||
return ctx, newArgs
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user