config

package
v0.4.1 Latest Latest
Warning

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

Go to latest
Published: Sep 23, 2020 License: Apache-2.0 Imports: 5 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

Functions

func Schema

func Schema() []byte

Schema returns the config file JSON schema.

Types

type Config

type Config struct {
	Style   string        `yaml:"style"`
	Timeout time.Duration `yaml:"timeout"`
	Hooks   []Hook        `yaml:"hooks" jsonschema:"required"`
}

Config represents the `.foreplay.yml` schema.

func Get

func Get() (Config, error)

Parses the config file and returns a struct.

type Hook

type Hook struct {
	ID  string `yaml:"id" jsonschema:"required"`
	Run string `yaml:"run" jsonschema:"required"`
}

Hook represents a task to be run on pre-commit.

Jump to

Keyboard shortcuts

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