spec

package
v1.20.0 Latest Latest
Warning

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

Go to latest
Published: Nov 28, 2026 License: MIT 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 spec checks the descriptions of collectors that gohai.Collectors returns against the rules of a collector. gohai collector validate prints the rules and the problems.

Index

Constants

View Source
const (
	RuleName       = "name"
	RuleCategory   = "category"
	RuleFacts      = "facts"
	RuleDependency = "dependency"
)

The rules that Problems checks, by the name a problem reports.

Variables

This section is empty.

Functions

This section is empty.

Types

type Check

type Check struct {
	Rule     string `json:"rule"`
	Requires string `json:"requires"`
	Fix      string `json:"fix"`
}

Check is one rule: what a collector must do, and how to fix it.

func Checks

func Checks() []Check

Checks are the rules of a collector, which gohai collector validate prints and checks.

type Problem

type Problem struct {
	Collector string `json:"collector"`
	Rule      string `json:"rule"`
	Message   string `json:"message"`
	Fix       string `json:"fix"`
}

Problem is a rule that a collector breaks.

func Problems

func Problems(
	specs []gohai.CollectorSpec,
) []Problem

Problems are the rules that the collectors of specs break.

Jump to

Keyboard shortcuts

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