Skip to content

Commit

Permalink
fix static check error
Browse files Browse the repository at this point in the history
Signed-off-by: Patricia Reinoso <patricia.reinoso@canonical.com>
  • Loading branch information
patriciareinoso committed Oct 30, 2024
1 parent 61cd027 commit bf6eb7b
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions configapi/api_inventory.go
Original file line number Diff line number Diff line change
Expand Up @@ -111,7 +111,7 @@ func handlePostGnb(c *gin.Context) error {
if !exists {
errorMessage := "post gNB request is missing gnb-name"
logger.ConfigLog.Errorln(errorMessage)
return fmt.Errorf(errorMessage)
return fmt.Errorf("%s", errorMessage)
}
logger.ConfigLog.Infof("received gNB %v", gnbName)
if !strings.HasPrefix(c.GetHeader("Content-Type"), "application/json") {
Expand All @@ -126,7 +126,7 @@ func handlePostGnb(c *gin.Context) error {
if postGnbRequest.Tac == "" {
errorMessage := "post gNB request body is missing tac"
logger.ConfigLog.Errorln(errorMessage)
return fmt.Errorf(errorMessage)
return fmt.Errorf("%s", errorMessage)
}
postGnb := configmodels.Gnb{
Name: gnbName,
Expand All @@ -147,7 +147,7 @@ func handleDeleteGnb(c *gin.Context) error {
if !exists {
errorMessage := "delete gNB request is missing gnb-name"
logger.ConfigLog.Errorln(errorMessage)
return fmt.Errorf(errorMessage)
return fmt.Errorf("%s", errorMessage)
}
logger.ConfigLog.Infof("received delete gNB %v request", gnbName)
msg := configmodels.ConfigMessage{
Expand Down Expand Up @@ -243,7 +243,7 @@ func handlePostUpf(c *gin.Context) error {
if !exists {
errorMessage := "post UPF request is missing upf-hostname"
logger.ConfigLog.Errorln(errorMessage)
return fmt.Errorf(errorMessage)
return fmt.Errorf("%s", errorMessage)
}
logger.ConfigLog.Infof("received UPF %v", upfHostname)
if !strings.HasPrefix(c.GetHeader("Content-Type"), "application/json") {
Expand All @@ -258,7 +258,7 @@ func handlePostUpf(c *gin.Context) error {
if postUpfRequest.Port == "" {
errorMessage := "post UPF request body is missing port"
logger.ConfigLog.Errorln(errorMessage)
return fmt.Errorf(errorMessage)
return fmt.Errorf("%s", errorMessage)
}
postUpf := configmodels.Upf{
Hostname: upfHostname,
Expand All @@ -279,7 +279,7 @@ func handleDeleteUpf(c *gin.Context) error {
if !exists {
errorMessage := "delete UPF request is missing upf-hostname"
logger.ConfigLog.Errorln(errorMessage)
return fmt.Errorf(errorMessage)
return fmt.Errorf("%s", errorMessage)
}
logger.ConfigLog.Infof("received delete UPF %v", upfHostname)
msg := configmodels.ConfigMessage{
Expand Down

0 comments on commit bf6eb7b

Please sign in to comment.