generate documentation and embed in binary

This commit is contained in:
Gokcehan committed 2016-09-14 00:40:14 +03:00
1 parent 57bebef804
commit 7d2ee16e2d
4 files changed
+125

No files matched your search

+6
View File
@@ -66,6 +66,7 @@ func startServer() {
}
func main() {
showDoc := flag.Bool("doc", false, "show documentation")
serverMode := flag.Bool("server", false, "start server (automatic)")
cpuprofile := flag.String("cpuprofile", "", "path to the file to write the cpu profile")
flag.StringVar(&gLastDirPath, "last-dir-path", "", "path to the file to write the last dir on exit (to use for cd)")
@@ -73,6 +74,11 @@ func main() {
flag.Parse()
if *showDoc {
fmt.Println(genDocString)
return
}
if *cpuprofile != "" {
f, err := os.Create(*cpuprofile)
if err != nil {