Allow setting default config path and AdminListen at compile time

By providing the following items to `LDFLAGS`:

* `-X github.com/yggdrasil-network/yggdrasil-go/src/defaults.defaultConfig=/path/to/config`
* '-X github.com/yggdrasil-network/yggdrasil-go/src/defaults.defaultAdminListen=unix://path/to/sock'

Closes #818.
This commit is contained in:
Neil Alexander 2022-09-24 14:09:08 +01:00
parent 0abfe78858
commit 217ac39e77
No known key found for this signature in database
GPG key ID: A02A2019A2BB0944
7 changed files with 26 additions and 10 deletions

View file

@ -5,7 +5,7 @@ package defaults
// Sane defaults for the macOS/Darwin platform. The "default" options may be
// may be replaced by the running configuration.
func GetDefaults() platformDefaultParameters {
func getDefaults() platformDefaultParameters {
return platformDefaultParameters{
// Admin
DefaultAdminListen: "unix:///var/run/yggdrasil.sock",