kamontia / qs

Support your fix-up quickly with git command
MIT License
5 stars 1 forks source link

Easy to expand design and its application #136

Open kamontia opened 5 years ago

kamontia commented 5 years ago

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

  1. Investigate where should be improved
  2. Design
  3. Implement
chaspy commented 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 commented 5 years ago

@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.