config

package
v0.6.4 Latest Latest
Warning

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

Go to latest
Published: Apr 8, 2026 License: MIT Imports: 4 Imported by: 0

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func AddRepo

func AddRepo(repo string) error

func DefaultPath

func DefaultPath() string

func RemoveRepo

func RemoveRepo(repo string) error

func Save

func Save(cfg *Config) error

Types

type Config

type Config struct {
	RepoEntries []RepoEntry `yaml:"repos"`
	Interval    int         `yaml:"interval"`
}

func Load

func Load() (*Config, error)

func (*Config) ExplicitPaths added in v0.2.0

func (c *Config) ExplicitPaths() map[string]string

ExplicitPaths returns a map of remote -> local path for repos with explicit paths.

func (*Config) Repos

func (c *Config) Repos() []string

Repos returns just the repo name strings for backward compatibility.

type RepoEntry added in v0.2.0

type RepoEntry struct {
	Name string `yaml:"name"`
	Path string `yaml:"path,omitempty"`
}

RepoEntry represents a watched repo with an optional local path override.

func (RepoEntry) MarshalYAML added in v0.2.0

func (r RepoEntry) MarshalYAML() (interface{}, error)

MarshalYAML writes as a plain string if no path is set.

func (*RepoEntry) UnmarshalYAML added in v0.2.0

func (r *RepoEntry) UnmarshalYAML(unmarshal func(interface{}) error) error

UnmarshalYAML supports both string and object formats:

repos:
  - owner/repo
  - name: owner/repo
    path: /home/user/projects/repo

Jump to

Keyboard shortcuts

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