diag

package
v0.9.0 Latest Latest
Warning

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

Go to latest
Published: Oct 26, 2026 License: Apache-2.0 Imports: 1 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 diag holds the non-fatal report type shared by the code that loads LOCALLY AUTHORED content: the MCP client's configuration and the TOML subset underneath it.

It is separate from the error types those packages return because the distinction is load-bearing: authored content is decoded leniently, so almost everything that goes wrong is something the embedder may want to log rather than something that stops the load. Only SeverityError means a thing was not loaded.

Index

Constants

View Source
const BOMPrefix = "\ufeff"

BOMPrefix is the UTF-8 byte order mark, written as an escape because a literal one in Go source is a compile error.

Variables

This section is empty.

Functions

This section is empty.

Types

type Diagnostic

type Diagnostic struct {
	// Path is the file the diagnostic concerns, empty when it is about a byte
	// stream the caller supplied directly.
	Path     string
	Line     int
	Severity Severity
	Message  string
}

Diagnostic is a non-fatal report from parsing or discovery.

func (Diagnostic) String

func (d Diagnostic) String() string

type Severity

type Severity string

Severity distinguishes a diagnostic that skipped something from one that rejected it outright.

const (
	SeverityWarning Severity = "warning"
	SeverityError   Severity = "error"
)

Jump to

Keyboard shortcuts

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