Skip to content

Commit

Permalink
fix: update decodeIdentifier function name
Browse files Browse the repository at this point in the history
Signed-off-by: Junjie Gao <[email protected]>
  • Loading branch information
JeyJeyGao committed Aug 1, 2023
1 parent cbce4c1 commit efa7575
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions internal/encoding/asn1/asn1.go
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,7 @@ func ConvertToDER(ber []byte) ([]byte, error) {

// decode decodes BER-encoded ASN.1 data structures.
func decode(r readOnlySlice) (value, error) {
identifier, isPrimitiveValue, err := identifierValue(r)
identifier, isPrimitiveValue, err := decodeIdentifier(r)
if err != nil {
return nil, err
}
Expand All @@ -64,8 +64,8 @@ func decode(r readOnlySlice) (value, error) {
return newConstructedValue(identifier, content)
}

// identifierValue decodes identifierValue octets.
func identifierValue(r readOnlySlice) (readOnlySlice, bool, error) {
// decodeIdentifier decodes decodeIdentifier octets.
func decodeIdentifier(r readOnlySlice) (readOnlySlice, bool, error) {
b, err := r.ReadByte()
if err != nil {
return nil, false, err
Expand Down

0 comments on commit efa7575

Please sign in to comment.