Documentation ¶
Overview ¶
Package configfile provides functionality around storing Git Town configuration information in a dedicated configuration file.
Index ¶
- Constants
- func Load() (*configdomain.PartialConfig, error)
- func RenderPerennialBranches(perennials gitdomain.LocalBranchNames) string
- func RenderTOML(config *configdomain.FullConfig) string
- func Save(config *configdomain.FullConfig) error
- func TOMLComment(text string) string
- func Validate(data Data) (configdomain.PartialConfig, error)
- type Branches
- type Data
- type Hosting
- type SyncStrategy
Constants ¶
View Source
const FileName = ".git-branches.toml"
Variables ¶
This section is empty.
Functions ¶
func Load ¶
func Load() (*configdomain.PartialConfig, error)
func RenderPerennialBranches ¶
func RenderPerennialBranches(perennials gitdomain.LocalBranchNames) string
func RenderTOML ¶
func RenderTOML(config *configdomain.FullConfig) string
func Save ¶
func Save(config *configdomain.FullConfig) error
func TOMLComment ¶
func Validate ¶
func Validate(data Data) (configdomain.PartialConfig, error)
Validate converts the given low-level configfile data into high-level config data.
Types ¶
type Branches ¶
type Data ¶
type Data struct { Branches *Branches `toml:"branches"` Hosting *Hosting `toml:"hosting"` PushHook *bool `toml:"push-hook"` PushNewbranches *bool `toml:"push-new-branches"` ShipDeleteTrackingBranch *bool `toml:"ship-delete-tracking-branch"` SyncBeforeShip *bool `toml:"sync-before-ship"` SyncStrategy *SyncStrategy `toml:"sync-strategy"` SyncUpstream *bool `toml:"sync-upstream"` }
Data defines the Go equivalent of the TOML file content.
type Hosting ¶
type SyncStrategy ¶
type SyncStrategy struct { FeatureBranches *string `toml:"feature-branches"` PerennialBranches *string `toml:"perennial-branches"` }
func (SyncStrategy) IsEmpty ¶
func (self SyncStrategy) IsEmpty() bool
Click to show internal directories.
Click to hide internal directories.