Documentation ¶
Index ¶
- func AllMatch(u1 []*UnitOption, u2 []*UnitOption) bool
- func Serialize(opts []*UnitOption) io.Reader
- func UnitNameEscape(unescaped string) string
- func UnitNamePathEscape(unescaped string) string
- func UnitNamePathUnescape(escaped string) string
- func UnitNameUnescape(escaped string) string
- type UnitOption
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func AllMatch ¶
func AllMatch(u1 []*UnitOption, u2 []*UnitOption) bool
func Serialize ¶
func Serialize(opts []*UnitOption) io.Reader
Serialize encodes all of the given UnitOption objects into a unit file
func UnitNameEscape ¶
UnitNameEscape escapes a string as `systemd-escape` would
func UnitNamePathEscape ¶
UnitNamePathEscape escapes a string as `systemd-escape --path` would
func UnitNamePathUnescape ¶
UnitNamePathUnescape unescapes a string as `systemd-escape --path --unescape` would
func UnitNameUnescape ¶
UnitNameUnescape unescapes a string as `systemd-escape --unescape` would
Types ¶
type UnitOption ¶
func Deserialize ¶
func Deserialize(f io.Reader) (opts []*UnitOption, err error)
Deserialize parses a systemd unit file into a list of UnitOption objects.
func NewUnitOption ¶
func NewUnitOption(section, name, value string) *UnitOption
func (*UnitOption) Match ¶
func (uo *UnitOption) Match(other *UnitOption) bool
func (*UnitOption) String ¶
func (uo *UnitOption) String() string
Click to show internal directories.
Click to hide internal directories.