Documentation
¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func EnvOrDefaultChroot ¶
func EnvOrDefaultChroot() string
EnvOrDefaultChroot returns the value of the GHW_CHROOT environs variable or the default value of "/" if not set
Types ¶
type Option ¶
type Option struct {
// To facilitate querying of sysfs filesystems that are bind-mounted to a
// non-default root mountpoint, we allow users to set the GHW_CHROOT environ
// vairable to an alternate mountpoint. For instance, assume that the user of
// ghw is a Golang binary being executed from an application container that has
// certain host filesystems bind-mounted into the container at /host. The user
// would ensure the GHW_CHROOT environ variable is set to "/host" and ghw will
// build its paths from that location instead of /
Chroot *string
}
Option is used to represent optionally-configured settings. Each field is a pointer to some concrete value so that we can tell when something has been set or left unset.
func WithChroot ¶
Click to show internal directories.
Click to hide internal directories.