librespeed / speedtest-go

Go backend for LibreSpeed
GNU Lesser General Public License v3.0
733 stars 157 forks source link

remove go-systemd for windows build #45

Closed masx200 closed 2 years ago

masx200 commented 2 years ago

https://github.com/librespeed/speedtest-go/issues/44

maddie commented 2 years ago

You should move the systemd-specific logic into a _windows.go file with build tags.

tim-seoss commented 2 years ago

FWIW, newer versions of go-systemd (since v22.2.0) should also compile on Windows:

https://github.com/coreos/go-systemd/pull/352

If you like, I could test this since it would allow just having a single for Windows/MacOS/Linux.

FWIW, I've pushed an update to the go-systemd dependency here: https://github.com/seoss/speedtest-go/tree/go-systemd-update-to-v22.4 ...and I've carried out basic testing (socket activation mode) on Linux.