chore: use gofumpt for code formatting
This commit is contained in:
@@ -7,7 +7,8 @@ import (
|
||||
)
|
||||
|
||||
func (p *Provider) GetConnection(selection settings.ServerSelection, ipv6Supported bool) (
|
||||
connection models.Connection, err error) {
|
||||
connection models.Connection, err error,
|
||||
) {
|
||||
defaults := utils.NewConnectionDefaults(0, 443, 0) //nolint:mnd
|
||||
return utils.GetConnection(p.Name(),
|
||||
p.storage, selection, defaults, ipv6Supported, p.randSource)
|
||||
|
||||
@@ -8,7 +8,8 @@ import (
|
||||
)
|
||||
|
||||
func (p *Provider) OpenVPNConfig(connection models.Connection,
|
||||
settings settings.OpenVPN, ipv6Supported bool) (lines []string) {
|
||||
settings settings.OpenVPN, ipv6Supported bool,
|
||||
) (lines []string) {
|
||||
providerSettings := utils.OpenVPNProviderSettings{
|
||||
AuthUserPass: true,
|
||||
Ciphers: []string{
|
||||
|
||||
@@ -16,7 +16,8 @@ type Provider struct {
|
||||
|
||||
func New(storage common.Storage, randSource rand.Source,
|
||||
unzipper common.Unzipper, updaterWarner common.Warner,
|
||||
parallelResolver common.ParallelResolver) *Provider {
|
||||
parallelResolver common.ParallelResolver,
|
||||
) *Provider {
|
||||
return &Provider{
|
||||
storage: storage,
|
||||
randSource: randSource,
|
||||
|
||||
@@ -12,7 +12,8 @@ import (
|
||||
var errCountryCodeUnknown = errors.New("country code is unknown")
|
||||
|
||||
func parseFilename(fileName, hostname string, titleCaser cases.Caser) (
|
||||
country, city string, err error) {
|
||||
country, city string, err error,
|
||||
) {
|
||||
const prefix = "ipvanish-"
|
||||
s := strings.TrimPrefix(fileName, prefix)
|
||||
|
||||
|
||||
@@ -14,7 +14,8 @@ import (
|
||||
)
|
||||
|
||||
func (u *Updater) FetchServers(ctx context.Context, minServers int) (
|
||||
servers []models.Server, err error) {
|
||||
servers []models.Server, err error,
|
||||
) {
|
||||
const url = "https://configs.ipvanish.com/configs/configs.zip"
|
||||
contents, err := u.unzipper.FetchAndExtract(ctx, url)
|
||||
if err != nil {
|
||||
|
||||
@@ -11,7 +11,8 @@ type Updater struct {
|
||||
}
|
||||
|
||||
func New(unzipper common.Unzipper, warner common.Warner,
|
||||
parallelResolver common.ParallelResolver) *Updater {
|
||||
parallelResolver common.ParallelResolver,
|
||||
) *Updater {
|
||||
return &Updater{
|
||||
unzipper: unzipper,
|
||||
warner: warner,
|
||||
|
||||
Reference in New Issue
Block a user