Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
go
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
Analytics
Analytics
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Commits
Issue Boards
Open sidebar
Kirill Smelkov
go
Commits
0d3dd3c9
Commit
0d3dd3c9
authored
Nov 04, 2009
by
Rob Pike
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
document godoc and gofmt
R=rsc
http://go/go-review/1018036
parent
4bb0271a
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
84 additions
and
0 deletions
+84
-0
src/cmd/godoc/doc.go
src/cmd/godoc/doc.go
+46
-0
src/cmd/gofmt/doc.go
src/cmd/gofmt/doc.go
+38
-0
No files found.
src/cmd/godoc/doc.go
0 → 100644
View file @
0d3dd3c9
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
The godoc program extracts and generates documentation for Go programs.
It has two modes.
Without the -http flag, it prints plain text documentation to standard output and exits.
godoc fmt
godoc fmt Printf
With the -http flag, it runs as a web server and presents the documentation as a web page.
godoc -http=:6060
Usage:
godoc [flag] package [name ...]
The flags are:
-v
verbose mode
-tabwidth=4
width of tabs in units of spaces
-tmplroot="lib/godoc"
root template directory (if unrooted, relative to --goroot)
-pkgroot="src/pkg"
root package source directory (if unrooted, relative to --goroot)
-html=
print HTML in command-line mode
-goroot=$GOROOT
Go root directory
-http=
HTTP service address (e.g., '127.0.0.1:6060' or just ':6060')
-sync="command"
if this and -sync_minutes are set, run the argument as a
command every sync_minutes; it is intended to update the
repository holding the source files.
-sync_minutes=0
sync interval in minutes; sync is disabled if <= 0
*/
package
documentation
src/cmd/gofmt/doc.go
0 → 100644
View file @
0d3dd3c9
// Copyright 2009 The Go Authors. All rights reserved.
// Use of this source code is governed by a BSD-style
// license that can be found in the LICENSE file.
/*
The gofmt program is a formatter for Go programs.
Without an explicit path, it processes the standard input. Given a file,
it operates on that file; given a directory, it operates on all .go files in
that directory, recursively. (Files starting with a period are ignored.)
Usage:
gofmt [flags] [path ...]
The flags are:
-l
just list files whose formatting differs from gofmt's; generate no other output
unless -w is also set.
-w
if set, overwrite each input file with its output.
-spaces
align with spaces instead of tabs.
-tabwidth=8
tab width in spaces.
-align=true
align columns.
Debugging flags:
-trace
print parse trace.
-comments=true
print comments; if false, all comments are elided from the output.
*/
package
documentation
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment