Photo by frank mckenna on Unsplash

I was working on creating a small service in Go earlier. Then I needed to build a Docker container for the service. Usually with Go application you will need some external packages/libraries and for that we use this command,

go get <the package source/URL >

So if you want to run the app with a Docker container you just created which depends on external packages then you will probably add something like this in the Dockerfile —

RUN go get ./...

And it works. But the problem with this approach is every time you do a Docker build it’ll run…


Photo by Chris Liverani on Unsplash

This has always been a big question after someone writes their application with Go — — “how can I restart the Go app I just wrote, when it crashes?”. Because you can not just keep it running like this go run main.go or ./main` and then when the program crashes it will restart itself.

A common and good solution for this problem is using Docker. But setting up Docker and configuring your app for the container takes time, specially — if your program interact with server/process like MySQL, Redis. For a big or a long term project that’s definitely the…


If you have used or worked with any sort of libraries or repositories from Github, even it could be your own repo, you might have needed (or will need) to share the link of the repository with others if you are stuck at some point.

And it’s a good way to share the link with specific file’s code being highlighted. Because if you are asking help from people specially in open source community, often people don’t wanna go in detail, cause everyone have their work, right? So everyone want to see or just have a glance at the code you…

Monir Zaman

Software Engineer, Musician

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store