chore: cleanup code formatting

This commit is contained in:
Christoph Haas
2025-02-28 08:29:40 +01:00
parent f7d7038829
commit e24acfa57d
67 changed files with 232 additions and 489 deletions

View File

@@ -5,12 +5,13 @@ import (
"sync"
"time"
"github.com/h44z/wg-portal/internal/app"
"github.com/h44z/wg-portal/internal/config"
"github.com/h44z/wg-portal/internal/domain"
probing "github.com/prometheus-community/pro-bing"
"github.com/sirupsen/logrus"
evbus "github.com/vardius/message-bus"
"github.com/h44z/wg-portal/internal/app"
"github.com/h44z/wg-portal/internal/config"
"github.com/h44z/wg-portal/internal/domain"
)
type StatisticsCollector struct {

View File

@@ -4,11 +4,10 @@ import (
"context"
"time"
"github.com/h44z/wg-portal/internal/app"
"github.com/sirupsen/logrus"
evbus "github.com/vardius/message-bus"
"github.com/h44z/wg-portal/internal/app"
"github.com/h44z/wg-portal/internal/config"
"github.com/h44z/wg-portal/internal/domain"
)

View File

@@ -5,12 +5,13 @@ import (
"errors"
"fmt"
"os"
"slices"
"time"
"github.com/h44z/wg-portal/internal"
"github.com/sirupsen/logrus"
"github.com/h44z/wg-portal/internal/app"
"github.com/h44z/wg-portal/internal/domain"
"github.com/sirupsen/logrus"
)
func (m Manager) GetImportableInterfaces(ctx context.Context) ([]domain.PhysicalInterface, error) {
@@ -120,11 +121,11 @@ func (m Manager) ImportNewInterfaces(ctx context.Context, filter ...domain.Inter
imported := 0
for _, physicalInterface := range physicalInterfaces {
if internal.SliceContains(excludedInterfaces, physicalInterface.Identifier) {
if slices.Contains(excludedInterfaces, physicalInterface.Identifier) {
continue
}
if len(filter) != 0 && !internal.SliceContains(filter, physicalInterface.Identifier) {
if len(filter) != 0 && !slices.Contains(filter, physicalInterface.Identifier) {
continue
}
@@ -193,7 +194,7 @@ func (m Manager) RestoreInterfaceState(
}
for _, iface := range interfaces {
if len(filter) != 0 && !internal.SliceContains(filter, iface.Identifier) {
if len(filter) != 0 && !slices.Contains(filter, iface.Identifier) {
continue // ignore filtered interface
}

View File

@@ -6,9 +6,10 @@ import (
"fmt"
"time"
"github.com/sirupsen/logrus"
"github.com/h44z/wg-portal/internal/app"
"github.com/h44z/wg-portal/internal/domain"
"github.com/sirupsen/logrus"
)
func (m Manager) CreateDefaultPeer(ctx context.Context, userId domain.UserIdentifier) error {