Help us shape the future of Go! Take the 2026 Go Developer Survey

protocol

package
v0.57.10 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 2 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	// ErrEmptyProtocolID is returned if the protocol id was empty.
	ErrEmptyProtocolID = errors.New("protocol id cannot be empty")
	// ErrInvalidProtocolID is returned if the protocol id was invalid.
	ErrInvalidProtocolID = errors.New("protocol id was invalid")
)

Functions

func IDsToString

func IDsToString(ids []ID) []string

IDsToString converts a slice of IDs to strings.

Types

type ID

type ID string

ID is a protocol identifier.

func (ID) String

func (i ID) String() string

String returns the ID as a string.

func (ID) Validate

func (i ID) Validate() error

Validate rejects empty or non-UTF-8 protocol identifiers.

Jump to

Keyboard shortcuts

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