Skip to content

AmirSoleimani/ctxecho

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Ctx Echo

Returns a map of all key-values stored inside a context. It only works with context.Context package.

Installation

Using go get:

go get github.com/AmirSoleimani/ctxecho@v1.0.0

Usage

It's very easy to use this pkg, You only need to call Inspect function.

import (
    // ...
    "github.com/AmirSoleimani/ctxecho"
    // ...
)

func MyServiceHandler(ctx context.Context) error {
    kvMap := ctxecho.Inspect(ctx)
    fmt.Printf("%+v\n", kvMap)

    // ...
    return nil
}

License

This code is licensed under the MIT license.

About

Inspect your context.Context values.

Topics

Resources

License

Stars

Watchers

Forks

Packages

No packages published

Languages