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

diagnostics

package
v0.63.0 Latest Latest
Warning

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

Go to latest
Published: Oct 10, 2026 License: MIT Imports: 12 Imported by: 0

Documentation

Index

Constants

View Source
const (
	MaxTailBytes  = 2 << 20
	MaxEntryBytes = 16 << 10
)

Variables

This section is empty.

Functions

func CLIPath

func CLIPath(environ []string, fallback string) string

func Read

func Read(id, path string) (Source, []Entry)

Types

type Entry

type Entry struct {
	ID        string            `json:"id"`
	Time      string            `json:"time"`
	Source    string            `json:"source"`
	Level     string            `json:"level"`
	Message   string            `json:"message"`
	Fields    map[string]string `json:"fields"`
	Raw       string            `json:"raw"`
	Truncated bool              `json:"truncated"`
}

func NewEntry

func NewEntry(source, id, at, severity, message, raw string, fields map[string]string) Entry

NewEntry normalizes a record supplied by a non-file diagnostics source.

func Parse

func Parse(source, raw string) Entry

type Source

type Source struct {
	ID        string `json:"id"`
	Path      string `json:"path"`
	UpdatedAt string `json:"updatedAt"`
	Error     string `json:"error"`
	Truncated bool   `json:"truncated"`
}

Jump to

Keyboard shortcuts

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