config

package
v0.1.0 Latest Latest
Warning

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

Go to latest
Published: Nov 15, 2016 License: MIT Imports: 9 Imported by: 5

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

This section is empty.

Types

type Config

type Config struct {
	MatchNamers FirstMatcher
}

func GetConfig

func GetConfig(content string) (*Config, error)

GetConfig extracts Config from content by parsing it as YAML.

func ReadFile

func ReadFile(cfgpath string) (*Config, error)

ReadRecipesFile opens the named file and extracts recipes from it.

type FirstMatcher

type FirstMatcher []common.MatchNamer

func (FirstMatcher) MatchAndName

func (f FirstMatcher) MatchAndName(nacl common.NameAndCmdline) (bool, string)

type Matcher

type Matcher interface {
	// Match returns empty string for no match, or the group name on success.
	Match(common.NameAndCmdline) bool
}

Jump to

Keyboard shortcuts

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