Documentation ¶
Index ¶
- func ListAll(path string, opts ...*OptionsList) ([]string, error)
- func LoadYaml(file string, out interface{}) error
- func LoadYamlBuffer(buffer []byte, out interface{}) error
- func LoadYamlPath(path string, out interface{}, opts ...*OptionsList) error
- type OptionsList
- func (opt *OptionsList) WithDepth(depth int) *OptionsList
- func (opt *OptionsList) WithIgnoreError(ignoreerror bool) *OptionsList
- func (opt *OptionsList) WithIncludeDir(includeDir bool) *OptionsList
- func (opt *OptionsList) WithPrefix(prefix string) *OptionsList
- func (opt *OptionsList) WithRecursion(recursion bool) *OptionsList
- func (opt *OptionsList) WithSuffix(suffix string) *OptionsList
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 LoadYamlBuffer ¶ added in v1.0.3
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
Click to show internal directories.
Click to hide internal directories.