Contribute
The framework consists of two main parts, each lives in a separate repository, the first part is the core
which contains the framework core packages. the second part is cup
which has the project folder structure and is responsible for gluing everything together.
To contribute you simply need to clone these two repositories locally and create new branches from the develop
branch, add your changes, then open up a PR
to the develop
branch.
Here is how you can clone and set up the development workflow on your local machine:
- Create the organization
goffee
directory in your workspace, make sure the full path to it looks like below:
$GOPATH/src/git.smarteching.com/goffee
- clone the repository
core
inside the organizationgoffee
directory:
git clone git@git.smarteching.com/goffee/core.git
- clone the repository
cup
:
git clone git@git.smarteching.com/goffee/cup.git
- cd into the project
cup
and open upgo.mod
in your editor and add the linegit.smarteching.com/goffee/core => [full-local-path-to-core]
to thereplace
statement, make sure it looks something like this:
module git.smarteching.com/goffee/cup
replace (
git.smarteching.com/goffee/core => /path-to-go-workspace/core
git.smarteching.com/goffee/cup/config => ./config
git.smarteching.com/goffee/cup/handlers => ./handlers
git.smarteching.com/goffee/cup/middlewares => ./middlewares
git.smarteching.com/goffee/cup/models => ./models
)
Note:
this is needed to tell go that instead of using the remote core package use the local copy where we will be making the changes, once you are done, open a PR
to develop
branch.