-
Setup Golang development environment by follow the official guide
-
Clone this repo and change working directory to the local directory which handles the cloned stuff
-
Run
setup.sh
under the root of the working directory to do some initializations which currently includes:- Create a
.env
file which handle the envs for devtools
- Create a
-
Run below command to resolve the dependencies:
make dep
-
Run below command to run tests
make gen # do some code-generation make test
The VS Code Go extension is recommended to easily debug code by:
- Choose a test in any
_test.go
file as the entrypoint of the debugging - Create a breakpoint by clicking the editor margin
- Click the
debug test
CodeLen on the top of the test function name - If the breakpoint in step 2 is on the road of the current test threading then the process will be hung up and the editor will be located to the source location of that breakpoint automatically