New returns a new Config with default values.
(rootDir string)
| 59 | |
| 60 | // New returns a new Config with default values. |
| 61 | func New(rootDir string) *Config { |
| 62 | return &Config{ |
| 63 | ChangeLogs: map[string]string{DefaultChangeLogKey: filepath.Join(rootDir, DefaultChangeLogFilename)}, |
| 64 | DefaultChangeLogs: []string{DefaultChangeLogKey}, |
| 65 | EntriesDir: filepath.Join(rootDir, DefaultEntriesDir), |
| 66 | TemplateYAML: filepath.Join(rootDir, DefaultEntriesDir, DefaultTemplateYAML), |
| 67 | } |
| 68 | } |
| 69 | |
| 70 | // NewFromFile returns a new Config from the specified YAML file. |
| 71 | func NewFromFile(rootDir string, cfgFilename string) (*Config, error) { |