summaryrefslogtreecommitdiff
path: root/src/cmd/godoc/codewalk.go
Commit message (Collapse)AuthorAgeFilesLines
* cmd/godoc: delete from core repositoryAndrew Gerrand2013-08-011-494/+0
| | | | | | | | The godoc command now lives at code.google.com/p/go.tools/cmd/godoc. R=golang-dev, r CC=golang-dev https://golang.org/cl/12206044
* godoc: replace servePage's positional argument listRobert Griesemer2012-03-301-4/+9
| | | | | | R=golang-dev, adg, bradfitz CC=golang-dev https://golang.org/cl/5869050
* godoc: use shorter titles for tabsRobert Griesemer2012-03-211-2/+2
| | | | | | | | | | | | | | | In a browser with many open tabs, the tab titles become short and uninformative because they all start with the same prefix ("Package ", "Directory ", etc.). Permit use of shorter tab titles that start with the relevant information first. Fixes #3365. R=golang-dev, bradfitz CC=golang-dev https://golang.org/cl/5865056
* godoc: fix codewalk handlerFrancisco Souza2012-03-131-1/+3
| | | | | | | | | | | | | | For URLs ending with /, the handler did not work, trying to append ".xml" to the path. For instance, the "Share Memory by Communicating" returned the following error: open /Users/francisco.souza/lib/go/doc/codewalk/sharemem/.xml: no such file or directory R=adg, minux.ma CC=golang-dev https://golang.org/cl/5797065
* godoc: support $GOPATH, simplify file system codeRuss Cox2012-03-051-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | The motivation for this CL is to support $GOPATH well. Since we already have a FileSystem interface, implement a Plan 9-style name space. Bind each of the $GOPATH src directories onto the $GOROOT src/pkg directory: now everything is laid out exactly like a normal $GOROOT and needs very little special case code. The filter files are no longer used (by us), so I think they can just be deleted. Similarly, the Mapping code and the FileSystem interface were two different ways to accomplish the same end, so delete the Mapping code. Within the implementation, since FileSystem is defined to be slash-separated, use package path consistently, leaving path/filepath only for manipulating operating system paths. I kept the -path flag, but I think it can be deleted too. Fixes #2234. Fixes #3046. R=gri, r, r, rsc CC=golang-dev https://golang.org/cl/5711058
* godoc: fix codewalksAndrew Gerrand2012-03-041-6/+6
| | | | | | R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/5732056
* cmd, pkg/go/*: fix "go vet" warnings for go/ast and go/printerNigel Tao2012-02-161-1/+1
| | | | | | | | struct literals. R=gri CC=golang-dev https://golang.org/cl/5653073
* encoding/xml: bring API closer to other packagesGustavo Niemeyer2012-01-241-3/+3
| | | | | | | | | | | | | Includes gofix module. The only case not covered should be xml.Unmarshal, since it remains with a similar interface, and would require introspecting the type of its first argument better. Fixes #2626. R=golang-dev, rsc, gustavo CC=golang-dev https://golang.org/cl/5574053
* os: new FileInfo, FileMode types + update treeRuss Cox2011-11-301-2/+2
| | | | | | R=golang-dev, r, r, gri, bradfitz, iant, iant, nigeltao, n13m3y3r CC=golang-dev https://golang.org/cl/5416060
* renaming_4: gofix -r everything/but/src/pkgRob Pike2011-11-081-4/+4
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/5338043
* non-pkg: gofix -r error -force=errorRuss Cox2011-11-011-9/+10
| | | | | | R=golang-dev, iant, r, r CC=golang-dev https://golang.org/cl/5307066
* regexp: move to old/regexp, replace with exp/regexpRuss Cox2011-09-261-1/+1
| | | | | | R=golang-dev, r CC=golang-dev https://golang.org/cl/5127042
* godoc: simplify internal FileSystem interfaceRobert Griesemer2011-09-211-2/+2
| | | | | | | | | - also fixed bug: ReadFile never closed the file before - per suggestion by bradfitz R=bradfitz CC=golang-dev https://golang.org/cl/5092047
* godoc, suffixarray: switch to exp/regexpRobert Griesemer2011-09-121-1/+1
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/4983058
* godoc: remove uses of container/vectorRobert Griesemer2011-08-201-4/+3
| | | | | | | | | | | | | | | | | | In the process, rewrite index.go to use slices instead of vectors, rewrite for-loops into range loops, and generally simplify code (this code was written before the launch of go and showed its age). Also, fix a wrong import in appinit.go. No significant performance changes (improvements); most of time is spent elsewhere (measured on an stand- alone MacBook Pro with SSD disk, running standard godoc settings: godoc -v -http=:7777 -index). R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4875056
* template: move exp/template into template.Rob Pike2011-08-171-1/+1
| | | | | | | | (Leave exp/template/html where it is for now.) R=golang-dev, dsymonds CC=golang-dev https://golang.org/cl/4899048
* godoc: moving to new template packageRobert Griesemer2011-08-111-1/+1
| | | | | | | | | | - first step; rough conversion of all template files - there is plenty of opportunity for cleanups/simplifications (next CLs) - html and text output as before R=r, dsymonds CC=golang-dev https://golang.org/cl/4852048
* go/printer: changed max. number of newlines from 3 to 2Robert Griesemer2011-07-141-12/+0
| | | | | | | | | | | | | manual changes in src/pkg/go/printer, src/cmd/gofix/signal_test.go (cd src/cmd/gofix/testdata; gofmt -w *.in *.out) (cd src/pkg/go/printer; gotest -update) gofmt -w misc src runs all tests R=golang-dev, rsc CC=golang-dev https://golang.org/cl/4715041
* sort: rename helpers: s/Sort// in sort.Sort[Float64s|Ints|Strings]Andrew Gerrand2011-07-081-1/+1
| | | | | | | | Includes 'sorthelpers' gofix and updates to tree. R=golang-dev, gri CC=golang-dev https://golang.org/cl/4631098
* reflect: support for struct tag use by multiple packagesRuss Cox2011-06-291-4/+4
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | Each package using struct field tags assumes that it is the only package storing data in the tag. This CL adds support in package reflect for sharing tags between multiple packages. In this scheme, the tags must be of the form key:"value" key2:"value2" (raw strings help when writing that tag in Go source). reflect.StructField's Tag field now has type StructTag (a string type), which has method Get(key string) string that returns the associated value. Clients of json and xml will need to be updated. Code that says type T struct { X int "name" } should become type T struct { X int `json:"name"` // or `xml:"name"` } Use govet to identify struct tags that need to be changed to use the new syntax. R=r, r, dsymonds, bradfitz, kevlar, fvbommel, n13m3y3r CC=golang-dev https://golang.org/cl/4645069
* godoc: replace direct OS file system accesses in favorRobert Griesemer2011-06-151-15/+15
| | | | | | | | | | | | of accesses via a FileSystem interface. Preparation for appengine version which gets its files via a snapshot or zip file and uses a corresponding FileSystem implementation. R=rsc, r CC=golang-dev https://golang.org/cl/4572065
* os: New Open API.Rob Pike2011-04-041-1/+1
| | | | | | | | | | | | | | | | | | | | | | | | We replace the current Open with: OpenFile(name, flag, perm) // same as old Open Open(name) // same as old Open(name, O_RDONLY, 0) Create(name) // same as old Open(name, O_RDWR|O_TRUNC|O_CREAT, 0666) This CL includes a gofix module and full code updates: all.bash passes. (There may be a few comments I missed.) The interesting packages are: gofix os Everything else is automatically generated except for hand tweaks to: src/pkg/io/ioutil/ioutil.go src/pkg/io/ioutil/tempfile.go src/pkg/crypto/tls/generate_cert.go src/cmd/goyacc/goyacc.go src/cmd/goyacc/units.y R=golang-dev, bradfitzwork, rsc, r2 CC=golang-dev https://golang.org/cl/4357052
* log: new interfaceRob Pike2010-10-121-3/+3
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | New logging interface simplifies and generalizes. 1) Loggers now have only one output. 2) log.Stdout, Stderr, Crash and friends are gone. Logging is now always to standard error by default. 3) log.Panic* replaces log.Crash*. 4) Exiting and panicking are not part of the logger's state; instead the functions Exit* and Panic* simply call Exit or panic after printing. 5) There is now one 'standard logger'. Instead of calling Stderr, use Print etc. There are now triples, by analogy with fmt: Print, Println, Printf What was log.Stderr is now best represented by log.Println, since there are now separate Print and Println functions (and methods). 6) New functions SetOutput, SetFlags, and SetPrefix allow global editing of the standard logger's properties. This is new functionality. For instance, one can call log.SetFlags(log.Lshortfile|log.Ltime|log.Lmicroseconds) to get all logging output to show file name, line number, and time stamp. In short, for most purposes log.Stderr -> log.Println or log.Print log.Stderrf -> log.Printf log.Crash -> log.Panicln or log.Panic log.Crashf -> log.Panicf log.Exit -> log.Exitln or log.Exit log.Exitf -> log.Exitf (no change) This has a slight breakage: since loggers now write only to one output, existing calls to log.New() need to delete the second argument. Also, custom loggers with exit or panic properties will need to be reworked. All package code updated to new interface. The test has been reworked somewhat. The old interface will be removed after the new release. For now, its elements are marked 'deprecated' in their comments. Fixes #1184. R=rsc CC=golang-dev https://golang.org/cl/2419042
* http: revised http Handler interfaceStephen Ma2010-09-291-21/+21
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/1993043
* update the tree to use the new regexp methodsRob Pike2010-08-121-2/+2
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/1983043
* godoc: report Status 404 if a pkg or file is not foundRobert Griesemer2010-08-101-0/+1
| | | | | | | | Fixes #1005. R=rsc, r CC=golang-dev https://golang.org/cl/1935041
* godoc: canonicalize codewalk pathsAndrew Gerrand2010-06-301-0/+5
| | | | | | R=rsc CC=golang-dev https://golang.org/cl/1729046
* godoc: add codewalk supportRuss Cox2010-04-261-0/+493
R=adg, gri CC=golang-dev, r https://golang.org/cl/1008042