scaffolder

package
v0.0.0-...-a53be28 Latest Latest
Warning

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

Go to latest
Published: Oct 22, 2021 License: MIT Imports: 9 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ParseKeyValueFromString

func ParseKeyValueFromString(contents string) (key, value string, err error)

func Scaffold

func Scaffold(scaffoldingDir, outputDir string, values Values, scheme Scheme) error

Scaffold processes all scaffolding rules from Scheme and populates scaffolding templates with given values.

Types

type Scheme

type Scheme struct {
	Entries []SchemeEntry `yaml:"scheme"`
}

Scheme holds a set of rules for scaffolding processFile.

func ParseScheme

func ParseScheme(path string, val Values) (Scheme, error)

ParseScheme compiles scheme from given file, completing it with given Values.

type SchemeEntry

type SchemeEntry struct {
	Source      string `yaml:"source"`
	Destination string `yaml:"destination"`
	Recursive   bool   `yaml:"recursive,omitempty"`
}

SchemeEntry holds one rule for scaffolding processFile.

type Values

type Values map[string]string

Values is a container with strings that are to be substituted in scaffolding and scheme.

Jump to

Keyboard shortcuts

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