encoding

package
v0.1.9 Latest Latest
Warning

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

Go to latest
Published: Sep 10, 2025 License: AGPL-3.0 Imports: 3 Imported by: 0 modules, 0 packages

The first number is the count of modules that contain a package that imports this one. The module count is a better indicator of popularity than the package count. A module with 100 importing packages is counted only once instead of 100 times, reflecting the fact that the choice to use the package was likely made only once, not 100 times.
A '?' means that the value hasn't been computed yet.

Documentation

Overview

Package encoding provides data types and functions for JSON or YAML encoding/decoding.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type HexBytes

type HexBytes []byte

HexBytes is a byte slice that is marshalled to and from a hex string.

func (HexBytes) MarshalJSON

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

MarshalJSON implements the json.Marshaler interface.

func (HexBytes) MarshalYAML

func (h HexBytes) MarshalYAML() (any, error)

MarshalYAML implements the yaml.Marshaler interface.

func (HexBytes) String

func (h HexBytes) String() string

String returns the hex encoded string representation of the byte slice.

func (*HexBytes) UnmarshalJSON

func (h *HexBytes) UnmarshalJSON(data []byte) error

UnmarshalJSON implements the json.Unmarshaler interface.

func (*HexBytes) UnmarshalYAML

func (h *HexBytes) UnmarshalYAML(unmarshal func(any) error) error

UnmarshalYAML implements the yaml.Unmarshaler interface.

Jump to

Keyboard shortcuts

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