mirror of
https://github.com/gohugoio/hugo.git
synced 2024-11-21 20:46:30 -05:00
Adding version number to command line options
This commit is contained in:
parent
d2a6267ad7
commit
aee48725eb
1 changed files with 5 additions and 0 deletions
5
main.go
5
main.go
|
@ -37,6 +37,7 @@ var (
|
|||
help = flag.Bool("h", false, "show this help")
|
||||
path = flag.String("p", "", "filesystem path to read files relative from")
|
||||
verbose = flag.Bool("v", false, "verbose output")
|
||||
version = flag.Bool("version", false, "which version of hugo")
|
||||
cpuprofile = flag.Int("cpuprofile", 0, "Number of times to create the site and profile it")
|
||||
watchMode = flag.Bool("w", false, "watch filesystem for changes and recreate as needed")
|
||||
server = flag.Bool("s", false, "run a (very) simple web server")
|
||||
|
@ -65,6 +66,10 @@ func main() {
|
|||
config.BaseUrl = *baseUrl
|
||||
}
|
||||
|
||||
if *version {
|
||||
fmt.Println("Hugo Static Site Generator v0.8")
|
||||
}
|
||||
|
||||
if *cpuprofile != 0 {
|
||||
f, err := os.Create("/tmp/hugo-cpuprofile")
|
||||
|
||||
|
|
Loading…
Reference in a new issue