config

package
v0.0.2 Latest Latest
Warning

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

Go to latest
Published: Feb 2, 2022 License: MIT Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddPathsToCollections

func AddPathsToCollections(root yaml.Node, paths []string, quote bool, validate bool) (yaml.Node, error)

Types

type Config

type Config struct {
	Settings []Setting `yaml:"settings"`
	// should be a single dir
	Templates []string `yaml:"templates"`
	// will instead look at all dir's within the collection dir
	// for any that have a _setup.yml
	Collections []string `yaml:"collections"`
}

func Read

func Read(path string) (Config, error)

func (Config) Validate

func (cfg Config) Validate() error

type Setting

type Setting struct {
	Name    string `yaml:"name"`
	Type    string `yaml:"type"`
	Prompt  string `yaml:"prompt"`
	Default string `yaml:"default"`
}

func (Setting) Validate

func (s Setting) Validate() error

Jump to

Keyboard shortcuts

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