Discover Packages
github.com/mainplane-ai/mainplane
pkg
elevate
package
Version:
v0.5.8
Opens a new window with list of versions in this module.
Published: Oct 28, 2026
License: MIT
Opens a new window with license information.
Imports: 4
Opens a new window with list of imports.
Imported by: 0
Opens a new window with list of known importers.
Documentation
Documentation
¶
Rendered for
linux/amd64
windows/amd64
darwin/amd64
js/wasm
Package elevate makes a command that needs root or admin work without the
user typing sudo or opening an elevated shell first.
Is says whether this process is root.
Root returns when this process is root or admin. Otherwise it runs this
binary with args elevated and exits as that does.
Run runs this binary with args under sudo, which asks for the password in
this terminal, and returns its exit code. A sudo that never ran is 1, and
returns, so the caller's cleanup runs.
Source Files
¶
Click to show internal directories.
Click to hide internal directories.