Returns a map of all key-values stored inside a context. It only works with context.Context
package.
Using go get:
go get github.com/AmirSoleimani/ctxecho@v1.0.0
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
}
This code is licensed under the MIT license.