Skip to content

Latest commit

 

History

History
27 lines (20 loc) · 1.23 KB

dev.md

File metadata and controls

27 lines (20 loc) · 1.23 KB

Preparations

  1. Setup Golang development environment by follow the official guide

  2. Clone this repo and change working directory to the local directory which handles the cloned stuff

  3. 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
  4. Run below command to resolve the dependencies:

    make dep
  5. Run below command to run tests

    make gen # do some code-generation
    make test

Debugging

The VS Code Go extension is recommended to easily debug code by:

  1. Choose a test in any _test.go file as the entrypoint of the debugging
  2. Create a breakpoint by clicking the editor margin
  3. Click the debug test CodeLen on the top of the test function name
  4. 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