dingoblog/dingo

A better way to create Dingo application in test cases.

Closed this issue · 2 comments

As we need to create a Dingo app mock-up for testing handlers, we need to register all of the routes in app/app.go for the app mock-up. However, we can not import github.com/dinever/dingo/app in handlers because of cyclic imports.

The temporary solution is to create a copy of those routes in app/handler/urls.go, which is pretty clumsy. We need to come up with a way to handle this gracefully.

nak3 commented

@dinever You don't want to move golf app interface to handler package? If we can move it, we can solve the issue like this https://github.com/dinever/dingo/pull/37

Closed in favor of #37