Now support for config files as yaml, json or toml

This commit is contained in:
spf13
2013-07-11 22:04:57 -04:00
parent d9b5f9cd9e
commit 75a2e6d4e8
5 changed files with 146 additions and 42 deletions

View File

@@ -26,13 +26,9 @@ import (
"time"
)
const (
cfgFiledefault = "config.yaml"
)
var (
baseUrl = flag.String("b", "", "hostname (and path) to the root eg. http://spf13.com/")
cfgfile = flag.String("c", cfgFiledefault, "config file (default is path/config.yaml)")
cfgfile = flag.String("c", "", "config file (default is path/config.yaml|json|toml)")
checkMode = flag.Bool("k", false, "analyze content and provide feedback")
draft = flag.Bool("d", false, "include content marked as draft")
help = flag.Bool("h", false, "show this help")