Skip to content

Commit

Permalink
add hexToBytes helper
Browse files Browse the repository at this point in the history
  • Loading branch information
tmm1 committed Apr 7, 2021
1 parent 077af8e commit 9d2253c
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions data_psi_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -2,12 +2,22 @@ package astits

import (
"bytes"
"encoding/hex"
"strings"
"testing"

"github.com/asticode/go-astikit"
"github.com/stretchr/testify/assert"
)

func hexToBytes(in string) []byte {
o, err := hex.DecodeString(strings.ReplaceAll(in, "\n", ""))
if err != nil {
panic(err)
}
return o
}

var psi = &PSIData{
PointerField: 4,
Sections: []*PSISection{
Expand Down

0 comments on commit 9d2253c

Please sign in to comment.