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

diagnostics

package
v0.20.1 Latest Latest
Warning

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

Go to latest
Published: Sep 27, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Overview

Package diagnostics persists generator type-degradation diagnostics and enforces a committed baseline over them.

The ratchet model: the baseline file records every currently-known degradation (unsafe.Pointer fallbacks, cycle-forced objc.ID substitutions). CI regenerates the bindings, collects fresh diagnostics, and fails when an entry appears that is not in the baseline — so quality can only improve. Fixing a degradation shrinks the baseline; introducing one requires an explicit, reviewed baseline edit.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckBaseline

func CheckBaseline(path string, entries []string) (newEntries, fixedEntries []string, err error)

CheckBaseline compares fresh diagnostics against the baseline at path. newEntries are diagnostics absent from the baseline (regressions — these should fail CI). fixedEntries are baseline entries that no longer occur (improvements — the baseline can be shrunk by rewriting it).

func Normalise

func Normalise(entries []string) []string

Normalise deduplicates and sorts diagnostic entries so that baseline files and comparisons are stable across runs regardless of emission order.

func Read

func Read(path string) ([]string, error)

Read loads a baseline file written by Write.

func Write

func Write(path string, entries []string) error

Write serialises the normalised entries to path as an indented JSON array, one entry per line — the committed baseline format.

Types

This section is empty.

Jump to

Keyboard shortcuts

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