status

package
v0.0.42 Latest Latest
Warning

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

Go to latest
Published: Nov 29, 2026 License: Apache-2.0 Imports: 9 Imported by: ? 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 status renders small, self-contained facts about the host (hostname, operating system, package manager, directories, environment variables) for allbctl's status output.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func CheckForDirectory

func CheckForDirectory(w *bytes.Buffer, dir string, dirToFind string) error

CheckForDirectory writes one line to w reporting whether dirToFind exists under dir: "Present", "Missing", "Not Directory", or "Unreadable" when it cannot be inspected. The error from inspecting the path, if any, is returned as well.

func PackageManager added in v0.0.8

func PackageManager(buf *bytes.Buffer) error

PackageManager adds package manager information to output

func SystemInfo added in v0.0.7

func SystemInfo(buf *bytes.Buffer) error

SystemInfo outputs basic system information

Types

type CheckEnvVarResult added in v0.0.9

type CheckEnvVarResult struct {
	Name   string
	Exists bool
}

CheckEnvVarResult is the outcome of looking up one environment variable.

func (CheckEnvVarResult) String added in v0.0.9

func (result CheckEnvVarResult) String() string

type EnvironmentVariableChecker added in v0.0.9

type EnvironmentVariableChecker struct{}

EnvironmentVariableChecker reports whether environment variables are set.

func NewEnvironmentVariableChecker added in v0.0.9

func NewEnvironmentVariableChecker() *EnvironmentVariableChecker

NewEnvironmentVariableChecker returns an EnvironmentVariableChecker.

func (EnvironmentVariableChecker) Check added in v0.0.9

func (checker EnvironmentVariableChecker) Check(envVarName string) (*CheckEnvVarResult, error)

Check reports whether envVarName is set in the process environment. A variable set to the empty string counts as existing. The error is always nil; it is part of the signature so other checkers can share it.

Jump to

Keyboard shortcuts

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