summaryrefslogtreecommitdiff
path: root/src/cmd/gofmt/doc.go
diff options
context:
space:
mode:
authorRob Pike <r@golang.org>2009-11-04 11:33:43 -0800
committerRob Pike <r@golang.org>2009-11-04 11:33:43 -0800
commit2dda6badcaa6efdbf6566f73d9389985af345e3c (patch)
tree37fea75a68111deecf85d24460d667d6652e5d75 /src/cmd/gofmt/doc.go
parent74e20c625b8c1856f1a76127efefe4ee29e18738 (diff)
downloadgolang-2dda6badcaa6efdbf6566f73d9389985af345e3c.tar.gz
document godoc and gofmt
R=rsc http://go/go-review/1018036
Diffstat (limited to 'src/cmd/gofmt/doc.go')
-rw-r--r--src/cmd/gofmt/doc.go38
1 files changed, 38 insertions, 0 deletions
diff --git a/src/cmd/gofmt/doc.go b/src/cmd/gofmt/doc.go
new file mode 100644
index 000000000..a374add4a
--- /dev/null
+++ b/src/cmd/gofmt/doc.go
@@ -0,0 +1,38 @@
+// 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