Allow interface{} keys when using logger
Signed-off-by: Stephen J Day <stephen.day@docker.com>
This commit is contained in:
parent
b0e94fb154
commit
360c24d975
3 changed files with 10 additions and 5 deletions
|
@ -20,7 +20,7 @@ func Since(ctx Context, key interface{}) time.Duration {
|
|||
|
||||
// GetStringValue returns a string value from the context. The empty string
|
||||
// will be returned if not found.
|
||||
func GetStringValue(ctx Context, key string) (value string) {
|
||||
func GetStringValue(ctx Context, key interface{}) (value string) {
|
||||
stringi := ctx.Value(key)
|
||||
if stringi != nil {
|
||||
if valuev, ok := stringi.(string); ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue