Open kamontia opened 5 years ago
from: https://github.com/kamontia/qs/pull/135
In above pull-requests, we tried to split the code.
However, we faced Circular reference
problem.
go build
import cycle not allowed
package github.com/kamontia/qs
imports github.com/kamontia/qs/model
imports github.com/kamontia/qs/utils
imports github.com/kamontia/qs/model
Exited with code 1
failed CI: https://circleci.com/gh/kamontia/qs/334
@kamontia
What is the problem with the current structure?
Which function should be placed in which module?
Let's first think about it as step 1: Investigate where should be improved
@kamontia I have already resolved Circular reference
problem at #135.
In #135, the amount of code in main.go has been reduced. In this issue, the purpose of the refactoring is to make it easy to expand the function.
AsIs
Although circulation of references is avoided, feature expansion is not easy
Background
In #135, the amount of code in main.go has been reduced. In this issue, the purpose of the refactoring is to make it easy to expand the function.
Tobe
Easy to extend feature
Steps