Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

chore(deps): bump golang from 1.22.6-bookworm to 1.23.0-bookworm #133

Merged
merged 2 commits into from
Aug 20, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
14 changes: 14 additions & 0 deletions .github/workflows/master.yml
Original file line number Diff line number Diff line change
Expand Up @@ -33,6 +33,20 @@ jobs:
- name: Build Docker image
run: make docker-build

staticcheck:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4

- uses: WillAbides/setup-go-faster@v1.14.0
with:
go-version-file: 'go.mod'

- uses: dominikh/staticcheck-action@v1.3.1
with:
version: latest
install-go: false

lint:
runs-on: ubuntu-latest
steps:
Expand Down
2 changes: 1 addition & 1 deletion Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@
# SPDX-License-Identifier: Apache-2.0
#

FROM golang:1.22.6-bookworm AS builder
FROM golang:1.23.0-bookworm AS builder

LABEL maintainer="Aether SD-Core <dev@aetherproject.org>"

Expand Down
2 changes: 1 addition & 1 deletion consumer/nf_discovery.go
Original file line number Diff line number Diff line change
Expand Up @@ -44,7 +44,7 @@ func SendNFIntances(nrfUri string, targetNfType, requestNfType models.NfType,
}()

if res != nil && res.StatusCode == http.StatusTemporaryRedirect {
err = fmt.Errorf("Temporary Redirect For Non NRF Consumer")
err = fmt.Errorf("temporary Redirect For Non NRF Consumer")
}
return
}
Expand Down
2 changes: 1 addition & 1 deletion factory/factory.go
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ func CheckConfigVersion() error {
currentVersion := UdmConfig.GetVersion()

if currentVersion != UDM_EXPECTED_CONFIG_VERSION {
return fmt.Errorf("config version is [%s], but expected is [%s].",
return fmt.Errorf("config version is [%s], but expected is [%s]",
currentVersion, UDM_EXPECTED_CONFIG_VERSION)
}

Expand Down
2 changes: 1 addition & 1 deletion producer/generate_auth_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -79,7 +79,7 @@ func aucSQN(opc, k, auts, rand []byte) ([]byte, []byte) {
func strictHex(s string, n int) string {
l := len(s)
if l < n {
return fmt.Sprintf(strings.Repeat("0", n-l) + s)
return fmt.Sprintln(strings.Repeat("0", n-l) + s)
} else {
return s[l-n : l]
}
Expand Down
2 changes: 1 addition & 1 deletion producer/subscriber_data_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -426,7 +426,7 @@ func getSupiProcedure(supi string, plmnID string, dataSetNames []string, support
} else {
var problemDetails models.ProblemDetails
problemDetails.Cause = "DATA_NOT_FOUND"
fmt.Printf(problemDetails.Cause)
fmt.Println(problemDetails.Cause)
}

if (res.StatusCode == http.StatusOK) && (res1.StatusCode == http.StatusOK) &&
Expand Down
2 changes: 1 addition & 1 deletion producer/ue_context_management.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,7 +28,7 @@ func createUDMClientToUDR(id string) (*Nudr_DataRepository.APIClient, error) {
uri := getUdrURI(id)
if uri == "" {
logger.Handlelog.Errorf("ID[%s] does not match any UDR", id)
return nil, fmt.Errorf("No UDR URI found")
return nil, fmt.Errorf("no UDR URI found")
}
cfg := Nudr_DataRepository.NewConfiguration()
cfg.SetBasePath(uri)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -46,5 +46,4 @@ func HTTPGetSmfSelectData(c *gin.Context) {
} else {
c.Data(rsp.Status, "application/json", responseBody)
}
return
}
181 changes: 0 additions & 181 deletions subscriberdatamanagement/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -173,29 +173,6 @@ var routes = Routes{
},
}

var specialRouter = Routes{
{
"GetIdTranslationResult",
strings.ToUpper("Get"),
"/:gpsi/id-translation-result",
HTTPGetIdTranslationResult,
},

{
"UnsubscribeForSharedData",
strings.ToUpper("Delete"),
"/shared-data-subscriptions/:subscriptionId",
HTTPUnsubscribeForSharedData,
},

{
"ModifyForSharedData",
strings.ToUpper("Patch"),
"/shared-data-subscriptions/:subscriptionId",
HTTPModifyForSharedData,
},
}

var oneLayerPathRouter = Routes{
{
"GetSupi",
Expand Down Expand Up @@ -290,161 +267,3 @@ var twoLayerPathRouter = Routes{
HTTPGetUeContextInSmsfData,
},
}

var threeLayerPathRouter = Routes{
{
"Unsubscribe",
strings.ToUpper("Delete"),
"/:supi/sdm-subscriptions/:subscriptionId",
HTTPUnsubscribe,
},

{
"Info",
strings.ToUpper("Put"),
"/:supi/am-data/sor-ack",
HTTPInfo,
},

{
"PutUpuAck",
strings.ToUpper("Put"),
"/:supi/am-data/upu-ack",
HTTPPutUpuAck,
},

{
"Modify",
strings.ToUpper("Patch"),
"/:supi/sdm-subscriptions/:subscriptionId",
HTTPModify,
},
}

var routesBackup = Routes{
{
"Index",
"GET",
"/",
Index,
},

{
"GetAmData",
strings.ToUpper("Get"),
"/:supi/am-data",
HTTPGetAmData,
},

{
"Info",
strings.ToUpper("Put"),
"/:supi/am-data/sor-ack",
HTTPInfo,
},

{
"GetSupi",
strings.ToUpper("Get"),
"/:supi",
HTTPGetSupi,
},

{
"GetSharedData",
strings.ToUpper("Get"),
"/shared-data",
HTTPGetSharedData,
},

{
"GetSmfSelectData",
strings.ToUpper("Get"),
"/:supi/smf-select-data",
HTTPGetSmfSelectData,
},

{
"GetSmsMngData",
strings.ToUpper("Get"),
"/:supi/sms-mng-data",
HTTPGetSmsMngData,
},

{
"GetSmsData",
strings.ToUpper("Get"),
"/:supi/sms-data",
HTTPGetSmsData,
},

{
"GetSmData",
strings.ToUpper("Get"),
"/:supi/sm-data",
HTTPGetSmData,
},

{
"GetNssai",
strings.ToUpper("Get"),
"/:supi/nssai",
HTTPGetNssai,
},

{
"Subscribe",
strings.ToUpper("Post"),
"/:supi/sdm-subscriptions",
HTTPSubscribe,
},

{
"SubscribeToSharedData",
strings.ToUpper("Post"),
"/shared-data-subscriptions",
HTTPSubscribeToSharedData,
},

{
"Unsubscribe",
strings.ToUpper("Delete"),
"/:supi/sdm-subscriptions/:subscriptionId",
HTTPUnsubscribe,
},

{
"UnsubscribeForSharedData",
strings.ToUpper("Delete"),
"/shared-data-subscriptions/:subscriptionId",
HTTPUnsubscribeForSharedData,
},

{
"GetTraceData",
strings.ToUpper("Get"),
"/:supi/trace-data",
HTTPGetTraceData,
},

{
"GetUeContextInSmfData",
strings.ToUpper("Get"),
"/:supi/ue-context-in-smf-data",
HTTPGetUeContextInSmfData,
},

{
"GetUeContextInSmsfData",
strings.ToUpper("Get"),
"/:supi/ue-context-in-smsf-data",
HTTPGetUeContextInSmsfData,
},

{
"GetIdTranslationResult",
strings.ToUpper("Get"),
"/:gpsi/id-translation-result",
HTTPGetIdTranslationResult,
},
}
4 changes: 2 additions & 2 deletions udm.go
Original file line number Diff line number Diff line change
Expand Up @@ -30,14 +30,14 @@ func main() {
app.Action = action
app.Flags = UDM.GetCliCmd()
if err := app.Run(os.Args); err != nil {
appLog.Errorf("UDM Run error: %v", err)
appLog.Errorf("udm run error: %v", err)
}
}

func action(c *cli.Context) error {
if err := UDM.Initialize(c); err != nil {
logger.CfgLog.Errorf("%+v", err)
return fmt.Errorf("Failed to initialize !!")
return fmt.Errorf("failed to initialize")
}

UDM.Start()
Expand Down
3 changes: 1 addition & 2 deletions ueauthentication/api_generate_auth_data.go
Original file line number Diff line number Diff line change
Expand Up @@ -39,7 +39,7 @@ func HttpGenerateAuthData(c *gin.Context) {
Detail: err.Error(),
Cause: "SYSTEM_FAILURE",
}
logger.UeauLog.Errorf("Get Request Body error: %+v", err)
logger.UeauLog.Errorf("get request body error: %+v", err)
c.JSON(http.StatusInternalServerError, problemDetail)
return
}
Expand Down Expand Up @@ -75,5 +75,4 @@ func HttpGenerateAuthData(c *gin.Context) {
} else {
c.Data(rsp.Status, "application/json", responseBody)
}
return
}
9 changes: 0 additions & 9 deletions ueauthentication/routers.go
Original file line number Diff line number Diff line change
Expand Up @@ -107,12 +107,3 @@ var routes = Routes{
HTTPConfirmAuth,
},
}

var specialRoutes = Routes{
{
"GenerateAuthData",
strings.ToUpper("Post"),
"/:supiOrSuci/security-information/generate-auth-data",
HttpGenerateAuthData,
},
}
Original file line number Diff line number Diff line change
Expand Up @@ -47,5 +47,4 @@ func HTTPGetAmf3gppAccess(c *gin.Context) {
} else {
c.Data(rsp.Status, "application/json", responseBody)
}
return
}
Original file line number Diff line number Diff line change
Expand Up @@ -74,5 +74,4 @@ func HTTPUpdateAmfNon3gppAccess(c *gin.Context) {
} else {
c.Data(rsp.Status, "application/json", responseBody)
}
return
}