Skip to content

Commit

Permalink
Apply gofmt to some files and add GO report card
Browse files Browse the repository at this point in the history
  • Loading branch information
gab-arrobo committed May 30, 2024
1 parent 5c51a36 commit 600c0bd
Show file tree
Hide file tree
Showing 7 changed files with 14 additions and 12 deletions.
3 changes: 2 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -3,12 +3,13 @@ Copyright 2021-present Open Networking Foundation
SPDX-License-Identifier: Apache-2.0
-->
[![Go Report Card](https://goreportcard.com/badge/github.com/omec-project/nas)](https://goreportcard.com/report/github.com/omec-project/nas)

# nas

1. Implementation of 3gpp specification 24.501 release 15 specification.

2. Supports NAS encoding/decoding of messages.
2. Supports NAS encoding/decoding of messages.

3. This module supports integrity & Ciphering algorithms

Expand Down
1 change: 1 addition & 0 deletions nas.go
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,7 @@ func NewGsmMessage() *GsmMessage {

// GmmHeader Octet1 protocolDiscriminator securityHeaderType
// Octet2 MessageType

type GmmHeader struct {
Octet [3]uint8
}
Expand Down
2 changes: 1 addition & 1 deletion nasMessage/NAS_CommInfoIE.go
Original file line number Diff line number Diff line change
Expand Up @@ -274,7 +274,7 @@ const (
SessionAMBRUnit256Pbps uint8 = 0x19
)

//TS 24.008 10.5.6.3
// TS 24.008 10.5.6.3
const (
PCSCFIPv6AddressRequestUL uint16 = 0x0001
IMCNSubsystemSignalingFlagUL uint16 = 0x0002
Expand Down
2 changes: 1 addition & 1 deletion nasMessage/NAS_DLNASTransport.go
Original file line number Diff line number Diff line change
Expand Up @@ -9,8 +9,8 @@ import (
"bytes"
"encoding/binary"
"fmt"
"net"
"github.com/omec-project/nas/nasType"
"net"
)

type DLNASTransport struct {
Expand Down
2 changes: 1 addition & 1 deletion nasType/NAS_AllowedSSCMode_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ func TestNasTypeNewAllowedSSCMode(t *testing.T) {
assert.NotNil(t, a)
}

//var nasTypePDUSessionEstablishmentRejectAllowedSSCModeOut = (nasMessage.PDUSessionEstablishmentRejectAllowedSSCModeType & 15) << 4
// var nasTypePDUSessionEstablishmentRejectAllowedSSCModeOut = (nasMessage.PDUSessionEstablishmentRejectAllowedSSCModeType & 15) << 4
var nasTypePDUSessionEstablishmentRejectAllowedSSCModeTable = []NasTypeIeiData{
{pDUSessionEstablishmentRejectAllowedSSCModeIeiInput, pDUSessionEstablishmentRejectAllowedSSCModeIeiInput},
}
Expand Down
8 changes: 4 additions & 4 deletions nasType/NAS_PDUSessionStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ type testPDUSessionStatusDataTemplate struct {
}

/*
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.
REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
*/
var PDUSessionStatusTestData = []nasType.PDUSessionStatus{
{nasMessage.ServiceRequestPDUSessionStatusType, 2, []uint8{}},
Expand Down
8 changes: 4 additions & 4 deletions nasType/NAS_UplinkDataStatus_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -391,11 +391,11 @@ type testUplinkDataStatusDataTemplate struct {
}

/*
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.
For the 1st testcase with len 2, our input for SetSpare function will not be read
as the len size is too small(< 3). However, SetSpare function won't raise any error
since the "make" function in golang will create a zero-length slice instead of nil slice.
REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
REFERENCE: https://programming.guide/go/nil-slice-vs-empty-slice.html
*/
var UplinkDataStatusTestData = []nasType.UplinkDataStatus{
{nasMessage.ServiceRequestUplinkDataStatusType, 2, []uint8{}},
Expand Down

0 comments on commit 600c0bd

Please sign in to comment.