If you use relative paths to files in your Go scrips then executable will look for them relative to the current working directory. To change working directory in systemd
just add WorkingDirectory
parameter to the Service
section:
[Service]
WorkingDirectory=/var/www/go
And place config.toml
file inside /var/www/go
dir.
You can also embed static files into Go binary using this library: https://github.com/gobuffalo/packr