Skip to content

echo.Context should embed net/context #500

Description

@asdine

I believe netContext.Context should be embedded in echo.Context instead of being a field, and context.Value() should call context.Set().

I think it would be much more interesting if echo.Context were compatible with context.Context :

  • Mocking context would be much much simpler (instead of having to implement our own 47 method Context Interface)
  • If needed we could create functions that receive a context.Context and pass them either echo.Context for real code, either a context.Context when testing. Again, super easy to test.
  • Decoupling Echo from the rest of the application that doesn't necessarily need to be bound to a specific framework.

Metadata

Metadata

Assignees

Type

No type

Fields

No fields configured for issues without a type.

Projects

No projects

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions