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: 1 module, 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

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