Skip to content
Permalink
Branch: master
Find file Copy path
Find file Copy path
Fetching contributors…
Cannot retrieve contributors at this time
18 lines (13 sloc) 293 Bytes
package jsonrpc
import "context"
type contextKey string
const requestID contextKey = "request_id"
// RequestID takes request id from context
func RequestID(ctx context.Context) string {
raw := ctx.Value(requestID)
value, ok := raw.(*id)
if !ok {
return ""
}
return value.String()
}
You can’t perform that action at this time.