vmconfig

package
v2.0.0-...-da0b90c Latest Latest
Warning

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

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

Documentation

Overview

package vmconfig reads in a config file for the vmbetter tool. vmconfig config files use valid Go syntax and are parsed by a go lexical scanner.

See example.conf in the vmconfig source tree for an example.

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	Path       string   // path to the head config file (passed to vmbetter)
	Parents    []string // paths to all dependent config files in order
	Packages   []string // list of in order packages to include (although order shouldn't matter)
	Overlays   []string // reverse order list of overlays
	Postbuilds []string // post build commands

	Constraints []string // constraints used when parsing file
}

Config contains a complete vmconfig configuration and is returned by ReadConfig. Config also contains the vmconfig parameters, in depth-first order of any parents inherited by the top level config.

func ReadConfig

func ReadConfig(path string, constraints ...string) (c Config, err error)

Read config returns a Config object with the config file parameters and any parents. Config is invalid on any non-nil error.

Jump to

Keyboard shortcuts

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