sysenv

package
v1.3.7 Latest Latest
Warning

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

Go to latest
Published: Oct 9, 2026 License: MIT Imports: 1 Imported by: 0

Documentation

Index

Constants

View Source
const (
	BinApt       = "/usr/bin/apt"
	BinAptConfig = "/usr/bin/apt-config"
	BinAptGet    = "/usr/bin/apt-get"
	BinBash      = "/bin/bash"
	BinDash      = "/bin/dash"
	BinDpkg      = "/usr/bin/dpkg"
	BinDpkgDeb   = "/usr/bin/dpkg-deb"
	BinDpkgQuery = "/usr/bin/dpkg-query"
	BinNSLookup  = "/usr/bin/nslookup"
	BinSh        = "/bin/sh"
	BinSleep     = "/bin/sleep"
	BinSystemctl = "/usr/bin/systemctl"
)

Linux 发行版常见绝对路径. 安装器和命令封装直接使用, 不在运行时搜索 PATH. 非 Linux 构建提供同名占位, 避免调用方再写平台分支.

Variables

This section is empty.

Functions

func IsLinux

func IsLinux() bool

IsLinux 检查当前操作系统是否为 Linux

func IsWindows

func IsWindows() bool

IsWindows 检查当前操作系统是否为 Windows

Types

This section is empty.

Jump to

Keyboard shortcuts

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