)]}' { "commit": "af1ae438b9218d5dbdb0bf0c756de1e3d4691551", "tree": "1fd06392c4af7dd6d4900661e8b4988913d92609", "parents": [ "155e21cc7f37ade106171ac53fd6826869811001" ], "author": { "name": "Andrew Gerrand", "email": "adg@golang.org", "time": "Thu Oct 06 11:56:17 2011 -0700" }, "committer": { "name": "Andrew Gerrand", "email": "adg@golang.org", "time": "Thu Oct 06 11:56:17 2011 -0700" }, "message": "go/doc, godoc, gotest: support for reading example documentation\n\nThis CL introduces the go.Example type and go.Examples functions that\nare used to represent and extract code samples from Go source.\n\nThey should be of the form:\n\n// Output of this function.\nfunc ExampleFoo() {\n fmt.Println(\"Output of this function.\")\n}\n\nIt also modifies godoc to read example code from _test.go files,\nand include them in the HTML output with JavaScript-driven toggles.\n\nIt also implements testing of example functions with gotest.\nThe stdout/stderr is compared against the output comment on the\nfunction.\n\nThis CL includes examples for the sort.Ints function and the\nsort.SortInts type. After patching this CL in and re-building go/doc\nand godoc, try\n godoc -http\u003dlocalhost:6060\nand visit http://localhost:6060/pkg/sort/\n\nR\u003dgri, r, rsc\nCC\u003dgolang-dev\nhttps://golang.org/cl/5137041\n", "tree_diff": [ { "type": "modify", "old_id": "f8f8c653fed54cd5345d248310d1b4877d25db84", "old_mode": 33188, "old_path": "doc/all.css", "new_id": "94d4774dd991d9c37d886efa5deff1652f25fe86", "new_mode": 33188, "new_path": "doc/all.css" }, { "type": "modify", "old_id": "946c4c39fde3efa7ea6d101809a18cf451286845", "old_mode": 33188, "old_path": "doc/godocs.js", "new_id": "cf97b31508c07ac793ff4200ed15992926eace9a", "new_mode": 33188, "new_path": "doc/godocs.js" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "8c1fd1adc632710cb66f01fbd15a80e54e5dd728", "new_mode": 33188, "new_path": "lib/godoc/example.html" }, { "type": "modify", "old_id": "559fe2dddde5a6164da11fc8fcaafc4cfa4bfbb0", "old_mode": 33188, "old_path": "lib/godoc/package.html", "new_id": "55812d17bc54b0ae5413a5316301526c5b458eaf", "new_mode": 33188, "new_path": "lib/godoc/package.html" }, { "type": "modify", "old_id": "f3db2c4d3dbb50913f10be2db39d61517da30315", "old_mode": 33188, "old_path": "src/cmd/godoc/godoc.go", "new_id": "08dff260d4ef3a76996e16f0e55d60d703649a20", "new_mode": 33188, "new_path": "src/cmd/godoc/godoc.go" }, { "type": "modify", "old_id": "88c746c1b70639169a21e2a80cd004e406e06aa4", "old_mode": 33188, "old_path": "src/cmd/gotest/gotest.go", "new_id": "69b0d580b0792c9b08f5f951c9c6f15f194d0ae0", "new_mode": 33188, "new_path": "src/cmd/gotest/gotest.go" }, { "type": "modify", "old_id": "a5152c79376e423428573ac07b1aa9bf3a4fc562", "old_mode": 33188, "old_path": "src/pkg/go/doc/Makefile", "new_id": "04c9fe74f455da2617a307baacd477bb089707e0", "new_mode": 33188, "new_path": "src/pkg/go/doc/Makefile" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "008f2b86b9597bb4df094f24d7bdc9a872851f90", "new_mode": 33188, "new_path": "src/pkg/go/doc/example.go" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "2f5ee90818cac95f72f6be43975a160ad9cc1531", "new_mode": 33188, "new_path": "src/pkg/sort/example_test.go" }, { "type": "modify", "old_id": "9e8bd175696311e518aca77ac4717ec14d372b59", "old_mode": 33188, "old_path": "src/pkg/testing/Makefile", "new_id": "04e5c75950a0a18be3b03aa6e3f85f7a05b56caa", "new_mode": 33188, "new_path": "src/pkg/testing/Makefile" }, { "type": "add", "old_id": "0000000000000000000000000000000000000000", "old_mode": 0, "old_path": "/dev/null", "new_id": "f148951d4fecf5379b428af31f3a9fec4a13995a", "new_mode": 33188, "new_path": "src/pkg/testing/example.go" }, { "type": "modify", "old_id": "37b5ca864c612b1262e48b092a2c7466553c1fac", "old_mode": 33188, "old_path": "src/pkg/testing/testing.go", "new_id": "4c2ff3d48781821e3053f4b18932024b372e203c", "new_mode": 33188, "new_path": "src/pkg/testing/testing.go" } ] }