After looking in the go documentation this seems to be what I am looking for https://golang.org/pkg/syscall/#Shutdown , what do you need to pass to this function?
This is not about system shutdown, but about shutting down connections. I think for system shutdown you need to use os/exec
and proper commands for current OS.