hex

package
v0.0.0-...-a3f86df Latest Latest
Warning

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

Go to latest
Published: Feb 17, 2026 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Overview

Package hex implements handy wrapper over hex encoding and decoding.

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrInvalidHexStringInput is an error when [String] is malformed.
	// It may occur during Unmarshal functions.
	ErrInvalidHexStringInput = errors.New("hex: invalid string")
)

Functions

This section is empty.

Types

type String

type String []byte

String is a representation of hex-encoded string.

Empty String is represented by nil or empty slice.

func (String) MarshalJSON

func (h String) MarshalJSON() ([]byte, error)

MarshalJSON implements json.Marshaler.

func (String) MarshalText

func (h String) MarshalText() ([]byte, error)

MarshalText implements encoding.TextMarshaler.

func (String) String

func (h String) String() string

func (*String) UnmarshalJSON

func (h *String) UnmarshalJSON(b []byte) error

UnmarshalJSON implements json.Unmarshaler.

func (*String) UnmarshalText

func (h *String) UnmarshalText(text []byte) error

UnmarshalText implements encoding.TextUnmarshaler.

Jump to

Keyboard shortcuts

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