Documentation
¶
Index ¶
- Constants
- func Discover(startDir string) (string, error)
- func SaveBoarded(root string, boarded map[string][]string) error
- func UpdateLocal(root string, fn func(*LocalConfig)) error
- type CapsuleConfig
- type Config
- type ConfigDiff
- type LocalConfig
- type RepoConfig
- type RepoFileConfig
- type WorkspaceConfig
Constants ¶
View Source
const FileName = "ws.toml"
View Source
const LocalFileName = "ws.local.toml"
View Source
const RepoFileName = "ws.repo.toml"
Variables ¶
This section is empty.
Functions ¶
func UpdateLocal ¶
func UpdateLocal(root string, fn func(*LocalConfig)) error
Types ¶
type CapsuleConfig ¶
type Config ¶
type Config struct {
Workspace WorkspaceConfig `toml:"workspace"`
Repos map[string]RepoConfig `toml:"repos"`
Boarded map[string][]string `toml:"-"` // from ws.local.toml [boarded] section
Git string `toml:"-"` // from ws.local.toml only
}
type ConfigDiff ¶
ConfigDiff describes repos added or removed between two configs.
func Diff ¶
func Diff(old, new *Config) ConfigDiff
Diff compares two configs and returns the repos that were added or removed.
func (ConfigDiff) IsEmpty ¶
func (d ConfigDiff) IsEmpty() bool
IsEmpty returns true if there are no changes.
type LocalConfig ¶
type LocalConfig struct {
Git string `toml:"git"`
Repos map[string]RepoConfig `toml:"repos"`
Boarded map[string][]string `toml:"boarded"`
}
type RepoConfig ¶
type RepoFileConfig ¶
type RepoFileConfig struct {
Capsule CapsuleConfig `toml:"capsule"`
}
func ParseRepoConfig ¶
func ParseRepoConfig(path string) (*RepoFileConfig, error)
ParseRepoConfig parses a ws.repo.toml file at the given path. Returns nil, nil if the file does not exist.
type WorkspaceConfig ¶
Click to show internal directories.
Click to hide internal directories.