Skip to content

Commit

Permalink
Fix: fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
TYuan0816 authored and andy89923 committed Jan 27, 2024
1 parent e9ba650 commit ae0a724
Show file tree
Hide file tree
Showing 9 changed files with 7 additions and 11 deletions.
2 changes: 1 addition & 1 deletion go.mod
Original file line number Diff line number Diff line change
Expand Up @@ -11,6 +11,7 @@ require (
github.com/gin-gonic/gin v1.9.1
github.com/google/gopacket v1.1.19
github.com/google/uuid v1.3.0
github.com/pkg/errors v0.9.1
github.com/sirupsen/logrus v1.8.1
github.com/stretchr/testify v1.8.3
github.com/urfave/cli v1.22.5
Expand Down Expand Up @@ -39,7 +40,6 @@ require (
github.com/modern-go/concurrent v0.0.0-20180306012644-bacd9c7ef1dd // indirect
github.com/modern-go/reflect2 v1.0.2 // indirect
github.com/pelletier/go-toml/v2 v2.0.8 // indirect
github.com/pkg/errors v0.9.1 // indirect
github.com/pmezard/go-difflib v1.0.0 // indirect
github.com/russross/blackfriday/v2 v2.0.1 // indirect
github.com/shurcooL/sanitized_anchor_name v1.0.0 // indirect
Expand Down
3 changes: 1 addition & 2 deletions internal/context/context.go
Original file line number Diff line number Diff line change
Expand Up @@ -104,7 +104,6 @@ func Init() {
InitAusfContext(&ausfContext)
}


type NFContext interface {
AuthorizationCheck(token, serviceName string) error
}
Expand Down Expand Up @@ -185,4 +184,4 @@ func (c *AUSFContext) AuthorizationCheck(token, serviceName string) error {

logger.UtilLog.Debugf("AUSFContext::AuthorizationCheck: token[%s] serviceName[%s]\n", token, serviceName)
return oauth.VerifyOAuth(token, serviceName, c.NrfCertPem)
}
}
2 changes: 1 addition & 1 deletion internal/logger/logger.go
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@ var (
UeAuthLog *logrus.Entry
Auth5gAkaLog *logrus.Entry
AuthELog *logrus.Entry
UtilLog *logrus.Entry
UtilLog *logrus.Entry
)

func init() {
Expand Down
1 change: 0 additions & 1 deletion internal/sbi/consumer/nf_management.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package consumer

import (

"fmt"
"net/http"
"strings"
Expand Down
1 change: 0 additions & 1 deletion internal/sbi/producer/functions.go
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
package producer

import (

"crypto/hmac"
"crypto/sha256"
"encoding/base64"
Expand Down
1 change: 0 additions & 1 deletion internal/sbi/producer/ue_authentication.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ package producer

import (
"bytes"

"crypto/sha256"
"encoding/base64"
"encoding/hex"
Expand Down
2 changes: 1 addition & 1 deletion internal/sbi/sorprotection/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ package sorprotection
import (
"net/http"
"strings"

"github.com/gin-gonic/gin"

ausf_context "github.com/free5gc/ausf/internal/context"
Expand Down
4 changes: 2 additions & 2 deletions internal/util/router_auth_check.go
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import (

"github.com/gin-gonic/gin"

ausf_context "github.com/free5gc/ausf/internal/context"
ausf_context "github.com/free5gc/ausf/internal/context"
"github.com/free5gc/ausf/internal/logger"
)

Expand All @@ -30,4 +30,4 @@ func (rac *RouterAuthorizationCheck) Check(c *gin.Context, ausfContext ausf_cont
}

logger.UtilLog.Debugf("RouterAuthorizationCheck: Check Authorized")
}
}
2 changes: 1 addition & 1 deletion internal/util/router_auth_check_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -88,4 +88,4 @@ func TestRouterAuthorizationCheck_Check(t *testing.T) {
}
})
}
}
}

0 comments on commit ae0a724

Please sign in to comment.