chore(errors): review all errors in codebase

This commit is contained in:
Quentin McGaw
2022-02-20 02:58:16 +00:00
parent ac4a4f83fc
commit 920ad8b54b
88 changed files with 254 additions and 460 deletions

View File

@@ -1,23 +1,16 @@
package ipvanish
import (
"errors"
"github.com/qdm12/gluetun/internal/configuration/settings"
"github.com/qdm12/gluetun/internal/constants"
"github.com/qdm12/gluetun/internal/models"
"github.com/qdm12/gluetun/internal/provider/utils"
)
var ErrProtocolUnsupported = errors.New("network protocol is not supported")
func (i *Ipvanish) GetConnection(selection settings.ServerSelection) (
connection models.Connection, err error) {
const port = 443
const protocol = constants.UDP
if *selection.OpenVPN.TCP {
return connection, ErrProtocolUnsupported
}
servers, err := i.filterServers(selection)
if err != nil {