chore: use gofumpt for code formatting

This commit is contained in:
Quentin McGaw
2024-10-11 19:20:48 +00:00
parent 3daf15a612
commit 76a4bb5dc3
289 changed files with 784 additions and 548 deletions

View File

@@ -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(80, 53, 0) //nolint:mnd
return utils.GetConnection(p.Name(),
p.storage, selection, defaults, ipv6Supported, p.randSource)

View File

@@ -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{
RemoteCertTLS: true,
AuthUserPass: true,

View File

@@ -16,7 +16,8 @@ type Provider struct {
func New(storage common.Storage, randSource rand.Source,
ipFetcher common.IPFetcher, unzipper common.Unzipper,
updaterWarner common.Warner, parallelResolver common.ParallelResolver) *Provider {
updaterWarner common.Warner, parallelResolver common.ParallelResolver,
) *Provider {
return &Provider{
storage: storage,
randSource: randSource,

View File

@@ -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://d11a57lttb2ffq.cloudfront.net/heartbleed/router/Recommended-CA2.zip"
contents, err := u.unzipper.FetchAndExtract(ctx, url)
if err != nil {

View File

@@ -12,7 +12,8 @@ type Updater struct {
}
func New(ipFetcher common.IPFetcher, unzipper common.Unzipper,
warner common.Warner, parallelResolver common.ParallelResolver) *Updater {
warner common.Warner, parallelResolver common.ParallelResolver,
) *Updater {
return &Updater{
ipFetcher: ipFetcher,
unzipper: unzipper,