How to work with core dumps of Go programs
If you want to check what is going on in your service during load (on production or during stress testing process), you can take a core dump of your app and load it into Goland for further debugging.
# first you need to get your app's PID
ps aux|grep <your-app-bin-name>
# download dump file and binary file to a local machine with
kubectl cp <some-namespace>/<some-pod>:/core.<PID> ~/Downloads
kubectl cp <some-namespace>/<some-pod>:<your-app-bin-path> ~/Downloads
Then open it your Goland:
Navigate to Run | Open Core Dump.
In the Executable field, specify a path to the binary file (for example, ~/Downloads/
In the Core Dump field, specify a path to the core file (for example, ~/Downloads/core.
Click OK. In the Debug tool window, select a frame that you want to inspect.
(in Russian) https://habr.com/ru/company/domclick/blog/495450/