...

Package ffyaml

import "github.com/peterbourgon/ff/v3/ffyaml"
Overview
Index

Overview ▾

Package ffyaml provides a YAML config file parser.

func Parser

func Parser(r io.Reader, set func(name, value string) error) error

Parser is a parser for YAML file format. Flags and their values are read from the key/value pairs defined in the config file.

type ParseError

ParseError wraps all errors originating from the YAML parser.

type ParseError struct {
    Inner error
}

func (ParseError) Error

func (e ParseError) Error() string

Error implenents the error interface.

func (ParseError) Unwrap

func (e ParseError) Unwrap() error

Unwrap implements the errors.Wrapper interface, allowing errors.Is and errors.As to work with ParseErrors.