What is the correct posture for golang development api, to debug the program?

use golang to develop the gin framework for backend api,. Now every time you finish writing an interface, you need to run go build xxx to perform a compilation, then execute the compiled binary file, and then debug the interface. There is a problem in the middle. After changing it, you have to repeat the above steps. It feels very tedious. Is my development method wrong? Or is there any debugging tool that can automatically compile and run commands according to code changes, so that after code changes, you can use the postman request interface to see the effect of the changes immediately?

New:
in docker, after running bee run with the bee tool, it remains in the lower interface, and code changes will not recompile

.

clipboard.png

The gadgets provided by

bee run
https://beego.me/docs/install.
beego are not intrusive. Change the code, save will be automatically edited, start, very convenient.


didn't you write the unit test for go? Just name it xx_test.go.


codegangsta/gin

basic usage

MySQL Query : SELECT * FROM `codeshelper`.`v9_news` WHERE status=99 AND catid='6' ORDER BY rand() LIMIT 5
MySQL Error : Disk full (/tmp/#sql-temptable-64f5-1b3e5a1-40993.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
MySQL Errno : 1021
Message : Disk full (/tmp/#sql-temptable-64f5-1b3e5a1-40993.MAI); waiting for someone to free some space... (errno: 28 "No space left on device")
Need Help?