detect

package
v0.26.0 Latest Latest
Warning

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

Go to latest
Published: Aug 23, 2026 License: MIT Imports: 7 Imported by: 0

Documentation

Overview

Package detect gathers system facts.

Index

Constants

This section is empty.

Variables

View Source
var CurrentUser = user.Current

CurrentUser resolves the OS account of the running process. It is a package-level var so tests can stub the lookup (root-vs-user, failures).

Functions

func Detect

func Detect() (*facts.Facts, error)

Detect returns system facts using the default readers.

func DetectWith

func DetectWith(osReader OSReleaseReader, gpuReader GPUReader) (*facts.Facts, error)

DetectWith returns system facts using the provided readers.

Types

type GPUReader

type GPUReader interface {
	Read() (string, error)
}

GPUReader reads GPU information.

type OSReleaseReader

type OSReleaseReader interface {
	Read() (string, error)
}

OSReleaseReader reads /etc/os-release content.

Jump to

Keyboard shortcuts

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