config

package
v0.4.0 Latest Latest
Warning

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

Go to latest
Published: Mar 30, 2024 License: MIT Imports: 10 Imported by: 0

Documentation

Overview

Configuration file

Index

Constants

This section is empty.

Variables

View Source
var DefaultConfigFilePaths = []string{".dirmap.yml", "dirmap.yml"}

Functions

This section is empty.

Types

type Config

type Config struct {
	Targets Targets  `yaml:"targets"`
	Ignores []string `yaml:"ignores,omitempty"`

	GitIgnore *gitignore.GitIgnore `yaml:"-"`
	// contains filtered or unexported fields
}

func New

func New() *Config

func (*Config) Getwd

func (c *Config) Getwd() string

func (*Config) Load

func (c *Config) Load(path string) error

func (*Config) LoadGitIgnore added in v0.2.0

func (c *Config) LoadGitIgnore(fsys fs.FS) error

LoadGitIgnore loads all .gitignore files recursively

func (*Config) Loaded

func (c *Config) Loaded() bool

func (*Config) Setwd

func (c *Config) Setwd(path string)

type Target

type Target struct {
	File          string `yaml:"file"`
	MatcherString string `yaml:"matcher"`
}

func (*Target) Matcher

func (t *Target) Matcher() (matcher.Matcher, error)

type Targets

type Targets []*Target

Jump to

Keyboard shortcuts

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