//nolint:golint package fenetsec import "context" type contextKey int const key contextKey = 0 // NewContext function will return the same passed in context, but with a // fenetsec type inserted into the context. func NewContext(ctx context.Context, ah *Client) context.Context { return context.WithValue(ctx, key, ah) } // FromContext function will pull the fenetsec client type out of the passed // in context value. func FromContext(ctx context.Context) *Client { return ctx.Value(key).(*Client) }