-
Notifications
You must be signed in to change notification settings - Fork 16
/
godoc.cli.txt
100 lines (76 loc) · 6.4 KB
/
godoc.cli.txt
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
GODOC
VERSION ==> #See Go language
RELATED DOCUMENTATION ==> #See Go language
/=+===============================+=\
/ : : \
)==: COMMENTS FORMAT :==(
\ :_______________________________: /
\=+===============================+=/
DOCUMENTATION FORMAT ==> #Use code comments from go doc (see its doc)
#Also automatically guesses types, etc. from source
LINKS ==> #Automatically add links
CODE BLOCK ==> #Code block if indented block
HEADERS ==> #Shown as headers if:
# - not first line
# - single line
# - no punctuation except ( ) ,
# - start with uppercase
# - followed by empty line, then another comment
Example[VARR][_SUFFIX]() #Example functions in *_test.go (see Go examples doc)
# - can prepend any comment
# - can append any SUFFIX
# - shows function body
# - if only one Example function in file, and there are some package-level declarations:
# - show full file content instead
# - by convention, called FILE_example.go
#VARR example:
# - VARR should be exported variable name, _-separated
# - empty if whole package
# - appears at the bottom of VARR documentation
#PACKAGE example:
# - no VARR
# - appears in package overview section
/=+===============================+=\
/ : : \
)==: CLI :==(
\ :_______________________________: /
\=+===============================+=/
godoc #Starts HTTP server with HTML documentation of all locally available MODULEs
#Includes a modules listing page
-http=[HOST]:PORT #Def: localhost:6060
-url=URL #Prints HTML from URL instead of spawning server
-notes=REGEXP #REGEXP to detect bug notes
#Partially matches "BUG" or any other word, which will be pluralized as header of its own section
-analysis=STR,... #Add to source code:
# - "type":
# - compile-time errors
# - type info on hover|click
# - go to definition on click
# - "pointer" (slow):
# - caller|callee on hover|click
# - call graphs
# - CHAN peers
#Only in non-module aware mode
-index #Add a text search
-maxresults=UINT #Max number of results in text search (def: 10000)
-index_interval #How often the text search is indexed, in secs.
#0|def is 5mins. Negative value means only once at startup.
-index_throttle=FLOAT #How much CPU text search indexer should receive among other goroutines, in percentage (def: 0.75)
-write_index #Write text search index to a file
-index_files="GLOB" #Index files location with -write_index
-play #Add a button to run Go in a browser playground
-timestamps=true #On main directory page, show last update timestamp
-links=false #Disable linking variables to their source code
-zip=FILE.zip #Modules source files location (def: GOPATH).
-goroot=GOROOT #Def: GOROOT
#When -zip specified, its origin DIR must be specified with -goroot
-templates=DIR #Customize HTML with a DIR with template files
-v #Verbose
URL?m=STR,... #Customize what is shown:
# - 'all': show documentation for non-exported variables as well, like go doc -all
# - 'methods': show all embedded methods
# - 'src': show source code only, not documentation
# - 'flat': in the modules listing page, show nested modules full names instead of indenting them
URL?GOOS|GOARCH=STR #Customize current GOOS|GOARCH