config

package
v0.5.0 Latest Latest
Warning

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

Go to latest
Published: May 1, 2020 License: MIT Imports: 2 Imported by: 0

Documentation

Index

Constants

View Source
const (
	// DefaultName is the default name of the configuration file for Pilgo.
	DefaultName = "pilgo.yml"
)

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	BaseDir string             `yaml:"baseDir,omitempty"`
	Link    string             `yaml:"link,omitempty"`
	Targets []string           `yaml:"targets,omitempty"`
	Options map[string]*Config `yaml:"options,omitempty"`
	Flatten bool               `yaml:"flatten,omitempty"`
	UseHome *bool              `yaml:"useHome,omitempty"`
	Tags    []string           `yaml:"tags,omitempty"`
}

Config is a configuration format for Pilgo.

func (*Config) Set

func (c *Config) Set(path string, new *Config, m SetMode)

Set sets o to path. The path may be nested, but will be a no-op if the parent paths don't exist already. An empty path sets the root configuration.

All fields of the original configuration are overridden. If preserving fields is the intention, use Merge instead.

type SetMode added in v0.5.0

type SetMode int

SetMode is a type for the mode used when setting a configuration.

const (
	// ModeConfig is the mode for setting every field except targets.
	ModeConfig SetMode = iota
	// ModeScan is the mode for setting only targets.
	ModeScan
)

Jump to

Keyboard shortcuts

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