such as Debug and release version compilation
In the file that you want to use in debug, add:
+build Debug
In another release version of the file, add:
+build!debug
Note//+build xxx This line before and after all need to have a blank line, if placed in the first line as long as there is a blank line behind the line
Compile with:
Go build-tags "Debug" main to compile the debug version, go build main to compile the release version
If a package contains build tag, use: Go install-tags "debug" xxx where xxx is the name of the package
Note: "Debug" can be used in double quotes or ·, which is the 1 on the left of the keyboard on the float, pay attention not to be written in single quotes, that does not
Also, if "debug" does not work, remember to delete the corresponding compiled packages in the PKG directory, most likely compiling system bugs without recompiling