Create Go service the easy way

For Windows, Linux, MacOS and Docker

Petr Jahoda
The Startup

--

Original Gopher image created by Renee French, used Gopher image created by Maria Letta
  1. part: you are reading it right now
  2. part: improving the service
  3. part: upgrade for web
  4. part: adding SSE
  5. part: simple javascript frontend functionality
  6. part: frontend — backend communication
  7. part: server-side logging
  8. part: run it all in docker
  9. part: adding database container
  10. part: database — service communication

Addition 1: functions, methods, pointers and interfaces
Addition 2: websocket communication
Addition 3: socket communication

Why would you want to create a service?

With Go programming language you can use the final executable the same way on Windows, Linux and MacOS (by generating proper executable). But you cannot install this executable as a service using standard system tools like sc.exe, systemd or launchd. By using this approach you will know, how to make your software executable installable with those system tools and make it run as a service, when system starts.

--

--