hexutil

package
v0.0.0-...-b10619e Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: Nov 17, 2022 License: Apache-2.0 Imports: 1 Imported by: 0

Documentation

Overview

Package hexutil implements hexadecimal encoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func MustDecodeString

func MustDecodeString(s string) []byte

MustDecodeString returns the bytes represented by the hexadecimal string s.

Types

type Bytes

type Bytes []byte

Bytes is a slice of bytes that marshals/unmarshals as a string in hexadecimal encoding.

func (Bytes) Bytes

func (b Bytes) Bytes() []byte

Bytes returns the underlying byte slice.

func (Bytes) MarshalText

func (b Bytes) MarshalText() ([]byte, error)

MarshalText implements the encoding.TextMarshaler interface.

func (Bytes) String

func (b Bytes) String() string

String returns the hex encoding of b.

func (*Bytes) UnmarshalText

func (b *Bytes) UnmarshalText(text []byte) (err error)

UnmarshalText implements the encoding.TextUnmarshaler interface.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL