Documentation ¶
Index ¶
- type ConfigMetadata
- func (d *ConfigMetadata) AppendTarget(src, dst string)
- func (d *ConfigMetadata) EmitManifest(path string) error
- func (d ConfigMetadata) ExpandTargets() []ConfigTarget
- func (d ConfigMetadata) Link(clobber bool) error
- func (d *ConfigMetadata) RemoveTarget(base string)
- func (d ConfigMetadata) Unlink() error
- type ConfigTarget
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type ConfigMetadata ¶
type ConfigMetadata struct { Author string `json:"author"` URL string `json:"url"` Branch string `json:"branch"` Targets []ConfigTarget `json:"targets"` }
func ReadManifest ¶
func ReadManifest(path string) (*ConfigMetadata, error)
NOTE: path should not include 'manifest.json'
func (*ConfigMetadata) AppendTarget ¶
func (d *ConfigMetadata) AppendTarget(src, dst string)
NOTE: in this case src and dst refer to the source inside of the config repository, and the destination in the user's configuration files. For example, if I was storing my neovim config: src = "nvim" dst = "#hom/.config/nvim"
func (*ConfigMetadata) EmitManifest ¶
func (d *ConfigMetadata) EmitManifest(path string) error
NOTE: path should point to the config DIRECTORY; it will create manifest.json on its own.
func (ConfigMetadata) ExpandTargets ¶
func (d ConfigMetadata) ExpandTargets() []ConfigTarget
THIS IS ALMOST ALWAYS THE CORRECT WAY TO READ A MANIFEST'S TARGETS
func (ConfigMetadata) Link ¶
func (d ConfigMetadata) Link(clobber bool) error
func (*ConfigMetadata) RemoveTarget ¶
func (d *ConfigMetadata) RemoveTarget(base string)
RemoveTarget takes the basename of the target as it appears in the config repository.
func (ConfigMetadata) Unlink ¶
func (d ConfigMetadata) Unlink() error
type ConfigTarget ¶
func (ConfigTarget) String ¶
func (t ConfigTarget) String() string
Click to show internal directories.
Click to hide internal directories.