deps

package
v0.11.0 Latest Latest
Warning

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

Go to latest
Published: Jun 22, 2026 License: Apache-2.0 Imports: 21 Imported by: 0

Documentation

Overview

Package deps - dependency checker for Doki system and Go dependencies.

Package deps ensures all required dependencies are included in go.mod. This file imports all dependencies that Doki v0.10 requires.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func DetectPackageManager

func DetectPackageManager() string

DetectPackageManager returns the name of the first supported package manager found on $PATH. Supported managers are: pkg (Termux), apt/apt-get (Debian), apk (Alpine), pacman (Arch), brew (macOS), dnf/yum (RHEL), zypper (SUSE). Returns the empty string when none are found.

func InstallDep

func InstallDep(name string) error

InstallDep uses the detected package manager to install the named dependency. It is best-effort: the native package name is resolved via pkgNameMap when the binary name differs from the package name (e.g. nft -> nftables). The command inherits the current process stdio so the user sees progress and can respond to prompts.

Types

type GoDepResult

type GoDepResult struct {
	Path    string
	Version string
}

GoDepResult is a single direct Go module dependency.

func CheckGoDeps

func CheckGoDeps() ([]GoDepResult, error)

CheckGoDeps reads the nearest go.mod (walking up from the current working directory) and returns the direct (non-indirect) module requirements.

type SystemDep

type SystemDep struct {
	Name        string
	Required    bool
	Optional    bool
	Check       func() (installed bool, version string)
	InstallHint string
}

SystemDep describes a system-level dependency that Doki can use.

type SystemDepResult

type SystemDepResult struct {
	Name        string
	Installed   bool
	Version     string
	Required    bool
	Optional    bool
	InstallHint string
	Path        string
}

SystemDepResult is the outcome of checking a single SystemDep.

func CheckSystemDeps

func CheckSystemDeps() []SystemDepResult

CheckSystemDeps inspects the host for tools that Doki can use and returns a result per dependency, in the canonical order.

Jump to

Keyboard shortcuts

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