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

wireerr

package
v0.0.11 Latest Latest
Warning

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

Go to latest
Published: Nov 1, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package wireerr holds what every wire's server sends of a refusal (RFC 0001 §15), so that remote and mcpworkspace cannot drift. It is an allow-list: a refusal crosses as its kind and that kind's fixed words, the system's fixed words for an error number, or, for a refusal of no kind, Other; never the served error's own text, which may name a path on the serving side's machine in any form (after a newline, as key=/path, as a file:// URL, with spaces in it), so no filter over that text could be trusted to catch it.

Index

Constants

View Source
const Other = "the workspace refused the operation"

Other is the message of a refusal of no kind.

Variables

This section is empty.

Functions

func Bounded

func Bounded(s string, max int) string

Bounded is s cut to max bytes and made valid UTF-8.

func Message

func Message(err, sentinel error, errnoOK bool) string

Message is what of err crosses a wire, err being of the kind sentinel stands for (nil for none): sentinel's words, the system's words for the error number err holds (but for the kinds whose words must stay as they are, where errnoOK is false), a context's error's own words, and Other for anything else.

Types

This section is empty.

Jump to

Keyboard shortcuts

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