From d8fc2b20d922d79bcd70a8ad56e79ac369c8f36f Mon Sep 17 00:00:00 2001 From: TYuan0816 Date: Sat, 27 Jan 2024 14:25:38 +0800 Subject: [PATCH] gofmt -s -w . --- internal/context/context.go | 3 +-- internal/logger/logger.go | 2 +- internal/sbi/consumer/nf_management.go | 1 - internal/sbi/producer/functions.go | 1 - internal/sbi/sorprotection/routers.go | 2 +- internal/util/router_auth_check.go | 4 ++-- internal/util/router_auth_check_test.go | 2 +- 7 files changed, 6 insertions(+), 9 deletions(-) diff --git a/internal/context/context.go b/internal/context/context.go index 347222b..cafb81b 100644 --- a/internal/context/context.go +++ b/internal/context/context.go @@ -104,7 +104,6 @@ func Init() { InitAusfContext(&ausfContext) } - type NFContext interface { AuthorizationCheck(token, serviceName string) error } @@ -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) -} \ No newline at end of file +} diff --git a/internal/logger/logger.go b/internal/logger/logger.go index b2d3ce3..90993e0 100644 --- a/internal/logger/logger.go +++ b/internal/logger/logger.go @@ -18,7 +18,7 @@ var ( UeAuthLog *logrus.Entry Auth5gAkaLog *logrus.Entry AuthELog *logrus.Entry - UtilLog *logrus.Entry + UtilLog *logrus.Entry ) func init() { diff --git a/internal/sbi/consumer/nf_management.go b/internal/sbi/consumer/nf_management.go index 3d3d6e3..5f3e8d4 100644 --- a/internal/sbi/consumer/nf_management.go +++ b/internal/sbi/consumer/nf_management.go @@ -1,7 +1,6 @@ package consumer import ( - "fmt" "net/http" "strings" diff --git a/internal/sbi/producer/functions.go b/internal/sbi/producer/functions.go index 59498a1..35d5a2c 100644 --- a/internal/sbi/producer/functions.go +++ b/internal/sbi/producer/functions.go @@ -1,7 +1,6 @@ package producer import ( - "crypto/hmac" "crypto/sha256" "encoding/base64" diff --git a/internal/sbi/sorprotection/routers.go b/internal/sbi/sorprotection/routers.go index 18640b9..a62cf6d 100644 --- a/internal/sbi/sorprotection/routers.go +++ b/internal/sbi/sorprotection/routers.go @@ -12,7 +12,7 @@ package sorprotection import ( "net/http" "strings" - + "github.com/gin-gonic/gin" ausf_context "github.com/free5gc/ausf/internal/context" diff --git a/internal/util/router_auth_check.go b/internal/util/router_auth_check.go index 88ea59a..37c571b 100644 --- a/internal/util/router_auth_check.go +++ b/internal/util/router_auth_check.go @@ -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" ) @@ -30,4 +30,4 @@ func (rac *RouterAuthorizationCheck) Check(c *gin.Context, ausfContext ausf_cont } logger.UtilLog.Debugf("RouterAuthorizationCheck: Check Authorized") -} \ No newline at end of file +} diff --git a/internal/util/router_auth_check_test.go b/internal/util/router_auth_check_test.go index bc0de90..cd98841 100644 --- a/internal/util/router_auth_check_test.go +++ b/internal/util/router_auth_check_test.go @@ -88,4 +88,4 @@ func TestRouterAuthorizationCheck_Check(t *testing.T) { } }) } -} \ No newline at end of file +}