Skip to content

Commit

Permalink
fix linter error
Browse files Browse the repository at this point in the history
  • Loading branch information
tim-ywliu committed May 3, 2024
1 parent b42522e commit 791517c
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
6 changes: 4 additions & 2 deletions cache.go
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,10 @@ import (
"sync"
)

var fieldParametersCache sync.Map
var structFieldCache structFieldCacheT
var (
fieldParametersCache sync.Map
structFieldCache structFieldCacheT
)

type structFieldCacheT struct {
m sync.Map
Expand Down
6 changes: 4 additions & 2 deletions marshal.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,10 @@ package aper

import (
"fmt"
"github.com/free5gc/aper/logger"
"log"
"reflect"

"github.com/free5gc/aper/logger"
)

type perRawBitData struct {
Expand Down Expand Up @@ -728,7 +729,8 @@ func (pd *perRawBitData) makeField(v reflect.Value, params fieldParameters) erro
}
refValue := *params.referenceFieldValue

if structField[present].FieldParameters.referenceFieldValue == nil || *structField[present].FieldParameters.referenceFieldValue != refValue {
if structField[present].FieldParameters.referenceFieldValue == nil ||
*structField[present].FieldParameters.referenceFieldValue != refValue {
return fmt.Errorf("reference value and present reference value is not match")
}
perTrace(2, "Encoding Present index of OpenType is %d ", present)
Expand Down

0 comments on commit 791517c

Please sign in to comment.