config

package
v0.0.0-...-3ed7c7a Latest Latest
Warning

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

Go to latest
Published: Jul 10, 2019 License: Apache-2.0 Imports: 8 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

View Source
var (
	ErrFilePathInvalid = errors.New("File Path invalid")
	ErrFileTypeInvalid = errors.New("File Type invalid")
	ErrDataInvalid     = errors.New("Data invalid")
)

Error definitions

Functions

This section is empty.

Types

type Config

type Config struct {
	License  License    `yaml:"license" json:"license"`
	Files    []FileType `yaml:"files" json:"files"`
	Excludes []string   `yaml:"excludes" json:"excludes"`
}

Config ...

func ReadFile

func ReadFile(path string) (c *Config, rerr error)

ReadFile ...

func ReadIOJSON

func ReadIOJSON(reader io.Reader) (*Config, error)

ReadIOJSON ...

func ReadIOYAML

func ReadIOYAML(reader io.Reader) (*Config, error)

ReadIOYAML ...

func ReadString

func ReadString(data string) (*Config, error)

ReadString ...

type FileType

type FileType struct {
	Match   string `yaml:"match" json:"match"`
	Comment string `yaml:"comment" json:"comment"`
}

FileType ...

type License

type License struct {
	Path    string `yaml:"path" json:"path"`
	Content string `yaml:"content" json:"content"`
}

License ...

Jump to

Keyboard shortcuts

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