dingoblog / dingo

Blog engine written in Go
MIT License
284 stars 37 forks source link

A better way to create Dingo application in test cases. #35

Closed dinever closed 8 years ago

dinever commented 8 years ago

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 8 years ago

@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

dinever commented 8 years ago

Closed in favor of #37