All Posts


Running a Go application as a windows service

This week I was looking to run a golang application as a windows service. Came across this neat library by github user kardianos on his github repo. It basically allows you to run Go programs as a service not just on Windows but also on Linux and that other OS (OSX) I dont like to talk about ;)

Following is the source of a simple console application that can run as a windows service with commands for install and uninstall


Copyright (c) 2021 Julien Dcruz