From 2a401797356b76e7e40c130a779d0738014e27dd Mon Sep 17 00:00:00 2001 From: Laura Henning Date: Fri, 20 Sep 2024 12:00:26 +0000 Subject: [PATCH] chore: linting --- internal/context/gnb.go | 3 ++- internal/context/user_plane_information.go | 8 ++++---- 2 files changed, 6 insertions(+), 5 deletions(-) diff --git a/internal/context/gnb.go b/internal/context/gnb.go index b4c264b1..0a2eca6f 100644 --- a/internal/context/gnb.go +++ b/internal/context/gnb.go @@ -4,9 +4,10 @@ import ( "fmt" "net" + "github.com/google/uuid" + "github.com/free5gc/pfcp/pfcpType" "github.com/free5gc/smf/internal/logger" - "github.com/google/uuid" ) // embeds the UPNode struct ("inheritance") diff --git a/internal/context/user_plane_information.go b/internal/context/user_plane_information.go index c8c39184..87a1c609 100644 --- a/internal/context/user_plane_information.go +++ b/internal/context/user_plane_information.go @@ -218,7 +218,7 @@ func NewUserPlaneInformation(upTopology *factory.UserPlaneInformation) *UserPlan staticUeIPPools = append(staticUeIPPools, staticUeIPPool) for _, dynamicUePool := range ueIPPools { if dynamicUePool.ueSubNet.Contains(staticUeIPPool.ueSubNet.IP) { - if err := dynamicUePool.Exclude(staticUeIPPool); err != nil { + if err = dynamicUePool.Exclude(staticUeIPPool); err != nil { logger.InitLog.Fatalf("exclude static Pool[%s] failed: %v", staticUeIPPool.ueSubNet, err) } @@ -228,10 +228,10 @@ func NewUserPlaneInformation(upTopology *factory.UserPlaneInformation) *UserPlan } for _, pool := range ueIPPools { if pool.pool.Min() != pool.pool.Max() { - if err := pool.pool.Reserve(pool.pool.Min(), pool.pool.Min()); err != nil { + if err = pool.pool.Reserve(pool.pool.Min(), pool.pool.Min()); err != nil { logger.InitLog.Errorf("Remove network address failed for %s: %s", pool.ueSubNet.String(), err) } - if err := pool.pool.Reserve(pool.pool.Max(), pool.pool.Max()); err != nil { + if err = pool.pool.Reserve(pool.pool.Max(), pool.pool.Max()); err != nil { logger.InitLog.Errorf("Remove network address failed for %s: %s", pool.ueSubNet.String(), err) } } @@ -463,7 +463,7 @@ func (upi *UserPlaneInformation) UpNodesFromConfiguration(upTopology *factory.Us staticUeIPPools = append(staticUeIPPools, ueIPPool) for _, dynamicUePool := range ueIPPools { if dynamicUePool.ueSubNet.Contains(ueIPPool.ueSubNet.IP) { - if err := dynamicUePool.Exclude(ueIPPool); err != nil { + if err = dynamicUePool.Exclude(ueIPPool); err != nil { logger.InitLog.Fatalf("exclude static Pool[%s] failed: %v", ueIPPool.ueSubNet, err) }