generate documentation and embed in binary
This commit is contained in:
1 parent
57bebef804
commit
7d2ee16e2d
4 files changed
+125
No files matched your search
@@ -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 {
|
||||
|
||||
Reference in new issue
Block a user