mirror of
https://git.sr.ht/~adnano/kiln
synced 2024-10-30 01:13:08 +00:00
config: Fix crash caused by nil map
This commit is contained in:
parent
26983cf57a
commit
2da77c0b80
|
@ -38,6 +38,9 @@ func (t Task) Format(p *Page) (string, []byte) {
|
|||
// LoadConfig loads the configuration from the provided path.
|
||||
func LoadConfig(path string) (*Config, error) {
|
||||
c := new(Config)
|
||||
c.Feeds = make(map[string]string)
|
||||
c.Tasks = make(map[string]*Task)
|
||||
|
||||
f, err := os.Open(path)
|
||||
if err != nil {
|
||||
return nil, err
|
||||
|
|
Loading…
Reference in a new issue