Documentation
¶
Index ¶
- Variables
- func IsEmpty(name string) (bool, error)
- func Unlink(stateConfig *StateConfig) (err error)
- func WriteStatefile(stateConfig StateConfig) (err error)
- type Arg
- type Collection
- type Collections
- type Config
- type ConfigManager
- type Diff
- type Differ
- type ExpertCollection
- type IHandler
- type SimpleCollection
- type StateConfig
- type UsageHelper
Constants ¶
This section is empty.
Variables ¶
View Source
var ( CompletionUse string = "completion [bash|zsh|fish|powershell]" CompletionShort string = "Generate completion script" InstallUse string = "install [uri]" InstallShort string = "Installs dotfiles" InstallLong string = "" DiffUse string = "diff [collection]" DiffShort string = "Show changes between linked files and repository" DiffLong string = `Show changes between linked files and repository` InstallLocalPath string = path.Join(homeDir, ".local/share/dotfiles") InstallGlobalPath string = "/usr/share/dotfiles" DotfileConfig []string = []string{"dotfiles.yaml", "dotfiles.yml", "dotfile.yaml", "dotfile.yml"} StateConfigName string = "dotfiles.yaml" LogDir string = "/var/log/dotfiles" )
Functions ¶
func Unlink ¶
func Unlink(stateConfig *StateConfig) (err error)
func WriteStatefile ¶
func WriteStatefile(stateConfig StateConfig) (err error)
Types ¶
type Collection ¶
type Collection struct {
Simple SimpleCollection
Expert ExpertCollection
}
func (*Collection) UnmarshalYAML ¶ added in v0.0.5
func (c *Collection) UnmarshalYAML(unmarshal func(interface{}) error) (err error)
type Collections ¶ added in v0.0.5
type Collections map[string]Collection
type Config ¶
type Config struct {
Collections Collections
}
func (*Config) UnmarshalYAML ¶ added in v0.0.5
type ConfigManager ¶
type ConfigManager struct {
ConfigPath string
Config Config
StateConfig StateConfig
}
type Differ ¶
type Differ struct {
StateConfig StateConfig
// contains filtered or unexported fields
}
type ExpertCollection ¶ added in v0.0.5
type SimpleCollection ¶ added in v0.0.5
type SimpleCollection []string
type StateConfig ¶
type StateConfig struct {
Context string `yaml:"context"`
ContextName string `yaml:"contextName"`
ContextAbsPath string `yaml:"contextAbsPath"`
Target string `yaml:"target"`
Linked map[string][]string `yaml:"linked"`
}
func ReadStatefile ¶
func ReadStatefile() (stateConfig StateConfig, err error)
func (*StateConfig) MarshalYAML ¶
func (l *StateConfig) MarshalYAML() (int interface{}, err error)
func (*StateConfig) UnmarshalYAML ¶
func (l *StateConfig) UnmarshalYAML(unmarshal func(interface{}) error) error
type UsageHelper ¶
func (*UsageHelper) AddArg ¶
func (helper *UsageHelper) AddArg(name string, description string)
func (*UsageHelper) AddOptArg ¶
func (helper *UsageHelper) AddOptArg(name string, description string)
func (*UsageHelper) Parse ¶
func (helper *UsageHelper) Parse() error
Click to show internal directories.
Click to hide internal directories.