Documentation
¶
Index ¶
- Constants
- func ConfigPath(dir, format string) string
- func DetectFormat(path string) string
- func EnsureConfig(rootDir, format string) (string, error)
- func FindConfigFile(dir string) (string, error)
- func RepoNameFromPath(p string) string
- func ValidateRepo(rootDir, repoPath, remote string) error
- type Config
- func (c *Config) AddGroup(name string) error
- func (c *Config) AddRepo(name, repoPath, remote, branch, desc string) error
- func (c *Config) AddRepoToGroup(groupName, repoName string) error
- func (c *Config) DeleteGroup(name string) error
- func (c *Config) RemoveRepo(name string) (*Repo, error)
- func (c *Config) RemoveRepoFromGroup(groupName, repoName string) error
- func (c *Config) RepoNamesForGroup(groupName string) ([]string, error)
- func (c *Config) Save(path string) error
- func (c *Config) SortedGroupNames() []string
- func (c *Config) SortedRepoNames() []string
- type Group
- type Repo
Constants ¶
View Source
const ( DefaultConfigName = ".repos" FormatTOML = "toml" FormatYAML = "yaml" )
Variables ¶
This section is empty.
Functions ¶
func ConfigPath ¶
func DetectFormat ¶
func EnsureConfig ¶
func FindConfigFile ¶
func RepoNameFromPath ¶
func ValidateRepo ¶ added in v0.0.3
Types ¶
type Config ¶
type Config struct {
Version int `toml:"version" yaml:"version"`
Repos map[string]*Repo `toml:"repos" yaml:"repos"`
Groups map[string]*Group `toml:"groups" yaml:"groups"`
}
func (*Config) AddRepoToGroup ¶
func (*Config) DeleteGroup ¶
func (*Config) RemoveRepoFromGroup ¶
func (*Config) RepoNamesForGroup ¶
func (*Config) SortedGroupNames ¶
func (*Config) SortedRepoNames ¶
Click to show internal directories.
Click to hide internal directories.