bzconf

package module
v1.0.3 Latest Latest
Warning

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

Go to latest
Published: Dec 17, 2020 License: GPL-3.0 Imports: 4 Imported by: 0

README

bzconf

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func ListAll

func ListAll(path string, opts ...*OptionsList) ([]string, error)

ListAll list all file at the path

func LoadYaml

func LoadYaml(file string, out interface{}) error

LoadYaml load yaml file, and decode to out

func LoadYamlBuffer added in v1.0.3

func LoadYamlBuffer(buffer []byte, out interface{}) error

LoadYamlBuffer load yaml buffer, and decode to out

func LoadYamlPath added in v1.0.1

func LoadYamlPath(path string, out interface{}, opts ...*OptionsList) error

LoadYamlPath load yaml file, and decode to out

Types

type OptionsList

type OptionsList struct {
	Prefix string // has Prefix
	Suffix string // has suffix

	IncludeDir bool // include dir, default false
	Depth      int  // depth

	Recursion   bool // recursion, default false,
	IgnoreError bool // return if false, default true
}

OptionsList option of ListAll

func DefaultOptionsList

func DefaultOptionsList() *OptionsList

DefaultOptionsList default OptionsList

func (*OptionsList) WithDepth

func (opt *OptionsList) WithDepth(depth int) *OptionsList

func (*OptionsList) WithIgnoreError

func (opt *OptionsList) WithIgnoreError(ignoreerror bool) *OptionsList

func (*OptionsList) WithIncludeDir

func (opt *OptionsList) WithIncludeDir(includeDir bool) *OptionsList

func (*OptionsList) WithPrefix

func (opt *OptionsList) WithPrefix(prefix string) *OptionsList

func (*OptionsList) WithRecursion

func (opt *OptionsList) WithRecursion(recursion bool) *OptionsList

func (*OptionsList) WithSuffix

func (opt *OptionsList) WithSuffix(suffix string) *OptionsList

Jump to

Keyboard shortcuts

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