Skip to content

Conversation

@dataBaseError
Copy link
Contributor

Copy the gin's key value store to api2go's key value store. This allows for middleware context values to be set in gin middleware and be used in api2go resources.

Fixes: #317

Copy the gin's key value store to api2go's key value store. This allows for middleware context values to be set in gin middleware and be used in api2go resources.
@wwwdata
Copy link
Member

wwwdata commented Aug 1, 2018

ok, LGTM and makes sense. Tests are also green except the tip go version that doesn't matter. However you didn't write a test that checks if the context value set is correctly working. Would you like to write a test for this as well?

@dataBaseError
Copy link
Contributor Author

@wwwdata sure thing I'll add a test for it.

@dataBaseError
Copy link
Contributor Author

@wwwdata I've added some tests, please let me know if they are sufficient.

Expect(keys).To(Equal(map[string]interface{}{contextKey: *contextValue}))
})

It("context value is not present for user resource", func() {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

not

@wwwdata wwwdata merged commit 6ccafcb into manyminds:master Aug 6, 2018
artlo pushed a commit to retailnext/api2go that referenced this pull request May 4, 2023
Added copy context from gin to api2go

Copy the gin's key value store to api2go's key value store. This allows for middleware context values to be set in gin middleware and be used in api2go resources.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants