Documentation ¶
Overview ¶
Package config provides access to the comply.yml file.
Index ¶
Constants ¶
View Source
const ( Jira = "jira" GitHub = "github" GitLab = "gitlab" NoTickets = "none" )
View Source
const ( // UseDocker invokes pandoc within Docker UseDocker = "docker" // UsePandoc invokes pandoc directly UsePandoc = "pandoc" )
Variables ¶
View Source
var Config = func() *Project { p := Project{} cfgBytes, err := ioutil.ReadFile(filepath.Join(ProjectRoot(), "comply.yml")) if err != nil { panic("unable to load config.yml: " + err.Error()) } yaml.Unmarshal(cfgBytes, &p) return &p }
Config is the parsed contents of ProjectRoot()/config.yml.
Functions ¶
func ProjectRoot ¶
func ProjectRoot() string
ProjectRoot is the fully-qualified path to the root directory.
func WhichPandoc ¶
func WhichPandoc() string
WhichPandoc indicates which pandoc invocation path should be used
Types ¶
type Project ¶
type Project struct { Name string `yaml:"name"` Pandoc string `yaml:"pandoc,omitempty"` FilePrefix string `yaml:"filePrefix"` Tickets map[string]interface{} `yaml:"tickets"` ApprovedBranch string `yaml:"approvedBranch"` }
func (*Project) TicketSystem ¶
TicketSystem indicates the type of the configured ticket system
Click to show internal directories.
Click to hide internal directories.