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
72e9ba2d78
commit
d30faf0fcd
|
@ -38,6 +38,9 @@ func (t Task) Format(p *Page) (string, []byte) {
|
||||||
// LoadConfig loads the configuration from the provided path.
|
// LoadConfig loads the configuration from the provided path.
|
||||||
func LoadConfig(path string) (*Config, error) {
|
func LoadConfig(path string) (*Config, error) {
|
||||||
c := new(Config)
|
c := new(Config)
|
||||||
|
c.Feeds = make(map[string]string)
|
||||||
|
c.Tasks = make(map[string]*Task)
|
||||||
|
|
||||||
f, err := os.Open(path)
|
f, err := os.Open(path)
|
||||||
if err != nil {
|
if err != nil {
|
||||||
return nil, err
|
return nil, err
|
||||||
|
|
Loading…
Reference in a new issue