Documentation ¶
Index ¶
Constants ¶
const ( DefaultRepositoryDir = "docs/decisions" DefaultConfigExt = "yaml" DefaultConfigName = ".adr" )
Variables ¶
This section is empty.
Functions ¶
func Find ¶
Find will return the repoDir/NNN-file-name.md for the specified ADR number if it exists in the repoDir
func Sanitize ¶
Sanitize ensures that the given string matches Title expectations (e.g. lowercase, no spaces, etc)
func Supersede ¶
Supersede will change the Source status to 'Superseded' and link to the Target. It will also append the 'Supersedes' backlink to the Target status
func UpdateStatus ¶
UpdateStatus will search for the Status section and replace the existing status with the 'to' status
Types ¶
type Config ¶
type Config struct { WorkingDirectory string `yaml:"-"` CfgFileName string `yaml:"-"` CfgFileExt string `yaml:"-"` *Repository *ADR }
func NewDefaultConfig ¶
func NewDefaultConfig() *Config
func (*Config) CreateAndWrite ¶
CreateAndWrite creates a file from the current structs values and then calls Write with it
func (*Config) EnsureRepositoryExists ¶
EnsureRepositoryExists creates the repository directory if it doesn't exist. ADRs will be stored in this directory
type Repository ¶
type Repository struct {
Path string `yaml:"path"`
}
Repository contains the metadata for an ADR repository (e.g. configurations, path, etc)