chore(constants): internal/constants/vpn package

This commit is contained in:
Quentin McGaw
2022-04-18 09:15:20 +00:00
parent d51514015f
commit 934fafb64b
25 changed files with 193 additions and 183 deletions

View File

@@ -4,8 +4,8 @@ import (
"fmt"
"github.com/qdm12/gluetun/internal/configuration/settings/helpers"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/constants/providers"
"github.com/qdm12/gluetun/internal/constants/vpn"
"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gotree"
)
@@ -26,7 +26,7 @@ type Provider struct {
func (p *Provider) validate(vpnType string, allServers models.AllServers) (err error) {
// Validate Name
var validNames []string
if vpnType == constants.OpenVPN {
if vpnType == vpn.OpenVPN {
validNames = providers.All()
validNames = append(validNames, "pia") // Retro-compatibility
} else { // Wireguard