kernelparameters

package
v0.0.8 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: GPL-3.0 Imports: 3 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type InvalidParameterError

type InvalidParameterError struct {
	Parameter string
}

func NewInvalidParameterError

func NewInvalidParameterError(p string) *InvalidParameterError

func (*InvalidParameterError) Error

func (i *InvalidParameterError) Error() string

type KernelParameters

type KernelParameters map[string]string

func MergeKernelParameters

func MergeKernelParameters(kp1 KernelParameters, kp2 ...KernelParameters) KernelParameters

MergeKernelParameters merges multiple sets of KernelParameters, with values from maps being overwritten in the order that they're passed into the function

func ParseString added in v0.0.8

func ParseString(s string) (KernelParameters, error)

ParseString will parse and validate s into a set of KernelParameters, and return an error if it encounters an invalid kernel parameter.

func ParseStringSlice added in v0.0.8

func ParseStringSlice(s []string) (KernelParameters, error)

ParseStringSlice will parse and validate s into a set of KernelParameters, and return an error if it encounters an invalid kernel parameter.

func (KernelParameters) String added in v0.0.8

func (k KernelParameters) String() string

String returns the string representation of the KernelParameters, e.g. 'initrd=initrd quiet splash'

func (KernelParameters) StringSlice added in v0.0.8

func (k KernelParameters) StringSlice() []string

StringSlice returns the set of KernelParameters as a slice of strings, e.g. ["initrd=initrd", "quiet", "splash"]

Jump to

Keyboard shortcuts

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