|
|
|
@ -12,7 +12,7 @@ import ( |
|
|
|
|
"flag" |
|
|
|
|
"time" |
|
|
|
|
"text/template" |
|
|
|
|
"git.learnjsthehardway.com/learn-code-the-hard-way/ssgod/config" |
|
|
|
|
"lcthw.dev/learn-code-the-hard-way/ssgod/config" |
|
|
|
|
"github.com/yuin/goldmark" |
|
|
|
|
"github.com/fsnotify/fsnotify" |
|
|
|
|
) |
|
|
|
@ -277,6 +277,7 @@ func InitConfig(config_file string) { |
|
|
|
|
out, err := os.OpenFile(config_file, os.O_RDWR|os.O_CREATE|os.O_TRUNC, 0644) |
|
|
|
|
if err != nil { log.Fatalf("error opening %s", config_file) } |
|
|
|
|
defer out.Close() |
|
|
|
|
|
|
|
|
|
out.WriteString(DEFAULT_CONFIG) |
|
|
|
|
} else { |
|
|
|
|
log.Fatalf("there's already a %s file here", config_file); |
|
|
|
|