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

preflight

package
v0.4.15 Latest Latest
Warning

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

Go to latest
Published: Sep 25, 2026 License: Apache-2.0 Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func Format

func Format(w io.Writer, results []Result)

Types

type Check

type Check struct {
	Name string
	Run  func(context.Context) error
}

type Result

type Result struct {
	Name   string `json:"name"`
	OK     bool   `json:"ok"`
	Detail string `json:"detail,omitempty"`
}

func Run

func Run(ctx context.Context, checks []Check) ([]Result, bool)

func RunWithTimeout added in v0.4.14

func RunWithTimeout(ctx context.Context, checks []Check, timeout time.Duration) ([]Result, bool)

RunWithTimeout gives every check its own timeout budget. A single shared deadline makes later checks fail only because earlier runtime checks were slow, which is especially visible with external Compose providers.

Jump to

Keyboard shortcuts

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