From f4f171fc7b82a94340044a1af581a1ac9429fc4e Mon Sep 17 00:00:00 2001 From: brianchennn Date: Fri, 1 Dec 2023 15:15:09 +0000 Subject: [PATCH] fix linter error --- internal/forwarder/gtp5g.go | 13 +++++++------ 1 file changed, 7 insertions(+), 6 deletions(-) diff --git a/internal/forwarder/gtp5g.go b/internal/forwarder/gtp5g.go index ac4ba1c..fbdb1ee 100644 --- a/internal/forwarder/gtp5g.go +++ b/internal/forwarder/gtp5g.go @@ -339,18 +339,19 @@ func (g *Gtp5g) newPdi(i *ie.IE) (nl.AttrList, error) { var sourceInterface uint8 var sdfFilterIE *ie.IE + +L: for _, x := range ies { switch x.Type { case ie.SourceInterface: - var err1 error - sourceInterface, err1 = x.SourceInterface() - if err1 != nil { - break + sourceInterface, err = x.SourceInterface() + if err != nil { + break L } case ie.FTEID: v, err := x.FTEID() if err != nil { - break + break L } attrs = append(attrs, nl.Attr{ Type: gtp5gnl.PDI_F_TEID, @@ -369,7 +370,7 @@ func (g *Gtp5g) newPdi(i *ie.IE) (nl.AttrList, error) { case ie.UEIPAddress: v, err := x.UEIPAddress() if err != nil { - break + break L } attrs = append(attrs, nl.Attr{ Type: gtp5gnl.PDI_UE_ADDR_IPV4,