Documentation
¶
Index ¶
Constants ¶
View Source
const ConfigFileName = ".wm.yaml"
Variables ¶
This section is empty.
Functions ¶
func FindConfig ¶
FindConfig searches for .wm.yaml starting from dir and walking up
func SaveConfig ¶
SaveConfig writes a Config to a .wm.yaml file
Types ¶
type Config ¶
type Config struct {
Version int `yaml:"version"`
Worktree WorktreeConfig `yaml:"worktree"`
Scan ScanConfig `yaml:"scan"`
Sync []SyncItem `yaml:"sync"`
Tasks TasksConfig `yaml:"tasks"`
}
Config represents the .wm.yaml file structure
func LoadConfig ¶
LoadConfig reads and parses a .wm.yaml file
type PostInstallConfig ¶
type ScanConfig ¶
type ScanConfig struct {
IgnoreDirs []string `yaml:"ignore_dirs"`
}
type SyncItem ¶
type SyncItem struct {
Src string `yaml:"src"`
Dst string `yaml:"dst,omitempty"`
Mode string `yaml:"mode,omitempty"` // "copy" (default) or "symlink"
When string `yaml:"when,omitempty"` // "always" (default) or "missing"
}
SyncItem can be a string path or an object with src/dst/mode/when
type TasksConfig ¶
type TasksConfig struct {
PostInstall PostInstallConfig `yaml:"post_install"`
}
type WorktreeConfig ¶
type WorktreeConfig struct {
BaseDir string `yaml:"base_dir"`
}
Click to show internal directories.
Click to hide internal directories.