devdiag

package
v0.35.0 Latest Latest
Warning

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

Go to latest
Published: Nov 10, 2026 License: AGPL-3.0 Imports: 3 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 devdiag sanitizes diagnostics that carry command or tool output before they reach typed errors, persisted launch status or logs. Every producer of such text (the controller's graph, the supervisor's launch commands, the host's managed plugin builder and the SDK verifier) goes through the same redactor so that a credential removed in one place cannot survive in another.

Index

Constants

View Source
const MaxBytes = 8192

MaxBytes bounds the text Safe returns: its tail, where the go command and the compilers print the failing line.

Variables

This section is empty.

Functions

func Redact

func Redact(text string) string

Redact removes credentials from text without bounding it. Truncate only after redacting, never before: a cut through the middle of a URL would otherwise leave a credential without the scheme that identifies it.

func Safe

func Safe(text, root string) string

Safe sanitizes command or compiler output for a diagnostic: credentials are removed (including the values of secret-named environment variables), the workspace root and home directory are replaced by placeholders, and only the last MaxBytes remain. An empty root is not replaced.

func Tail

func Tail(text string, limit int) string

Tail returns the last limit bytes of text, marked with a leading "..." when it had to cut. Redact first.

Types

This section is empty.

Jump to

Keyboard shortcuts

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