embedded

package
v0.10.0 Latest Latest
Warning

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

Go to latest
Published: Feb 10, 2026 License: MIT Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func FS

func FS() embed.FS

FS returns the underlying embed.FS

func InstallSudoers added in v0.10.0

func InstallSudoers(host SudoersInstaller) error

InstallSudoers installs the embedded sudoers file if it is not already installed with the expected content. This may prompt for a sudo password.

func Read

func Read(file string) ([]byte, error)

Read reads the content of file

func ReadString

func ReadString(file string) (string, error)

ReadString reads the content of file as string

func SudoersInstalled added in v0.10.0

func SudoersInstalled() bool

SudoersInstalled checks if the sudoers file contains the expected embedded content.

Types

type SudoersInstaller added in v0.10.0

type SudoersInstaller interface {
	RunInteractive(args ...string) error
	RunWith(stdin io.Reader, stdout io.Writer, args ...string) error
}

SudoersInstaller provides the ability to run commands on the host for installing the sudoers file.

Jump to

Keyboard shortcuts

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