From 2caa64571bda5978b20d24f209cae6da4506cabc Mon Sep 17 00:00:00 2001 From: Christoph Haas Date: Tue, 6 Apr 2021 23:01:50 +0200 Subject: [PATCH] fix duplicate configuration tag (#6) --- internal/wireguard/config.go | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/internal/wireguard/config.go b/internal/wireguard/config.go index ee84fe4..2937013 100644 --- a/internal/wireguard/config.go +++ b/internal/wireguard/config.go @@ -3,10 +3,10 @@ package wireguard import "github.com/h44z/wg-portal/internal/common" type Config struct { - DeviceNames []string `yaml:"devices" envconfig:"WG_DEVICES"` // managed devices - DefaultDeviceName string `yaml:"devices" envconfig:"WG_DEFAULT_DEVICE"` // this device is used for auto-created peers, use GetDefaultDeviceName() to access this field - ConfigDirectoryPath string `yaml:"configDirectory" envconfig:"WG_CONFIG_PATH"` // optional, if set, updates will be written to this path, filename: .conf - ManageIPAddresses bool `yaml:"manageIPAddresses" envconfig:"MANAGE_IPS"` // handle ip-address setup of interface + DeviceNames []string `yaml:"devices" envconfig:"WG_DEVICES"` // managed devices + DefaultDeviceName string `yaml:"defaultDevice" envconfig:"WG_DEFAULT_DEVICE"` // this device is used for auto-created peers, use GetDefaultDeviceName() to access this field + ConfigDirectoryPath string `yaml:"configDirectory" envconfig:"WG_CONFIG_PATH"` // optional, if set, updates will be written to this path, filename: .conf + ManageIPAddresses bool `yaml:"manageIPAddresses" envconfig:"MANAGE_IPS"` // handle ip-address setup of interface } func (c Config) GetDefaultDeviceName() string {