github.com/jpmicrosoft/grab/v3@v3.0.2/pkg/grabtest/util.go (about)

     1  package grabtest
     2  
     3  import "encoding/hex"
     4  
     5  func MustHexDecodeString(s string) (b []byte) {
     6  	var err error
     7  	b, err = hex.DecodeString(s)
     8  	if err != nil {
     9  		panic(err)
    10  	}
    11  	return
    12  }
    13  
    14  func MustHexEncodeString(b []byte) (s string) {
    15  	return hex.EncodeToString(b)
    16  }