summaryrefslogtreecommitdiff
path: root/src/pkg/go
AgeCommit message (Collapse)AuthorFilesLines
2009-11-23gofmt -r: documentation and minor fixesRuss Cox1-13/+23
fix a few paren insertion bugs in the printer too. R=gri, r CC=golang-dev http://codereview.appspot.com/157119
2009-11-20gofmt: add -r flag to rewrite source code according to patternRuss Cox1-3/+13
a little slow, but usable (speed unchanged when not using -r) tweak go/printer to handle nodes without line numbers more gracefully in a couple cases. R=gri http://codereview.appspot.com/156103
2009-11-20gofmt -r 'α[β:len(α)] -> α[β:]' -w src/cmd src/pkgRuss Cox4-12/+12
R=r, gri CC=golang-dev http://codereview.appspot.com/156115
2009-11-19Permit omission of hi bound in slices.Robert Griesemer7-16/+57
R=r, rsc http://codereview.appspot.com/157082
2009-11-09- minor cleanupsRobert Griesemer2-20/+19
- better debugging support - gofmt -l src misc | wc -l is 0 R=rsc http://go/go-review/1024042
2009-11-09 - replaced gofmt expression formatting algorithm withRobert Griesemer16-216/+515
rsc's algorithm - applied gofmt -w misc src - partial CL (remaining files in other CLs) R=rsc, r http://go/go-review/1026036
2009-11-09remove semis after statements in one-statement statement listsRobert Griesemer21-626/+626
R=rsc, r http://go/go-review/1025029
2009-11-09- rename Context to exprContext to remove it from public interfaceRobert Griesemer1-4/+4
(and to match the style of declContext) R=rsc http://go/go-review/1024033
2009-11-09fix for nodeSize computation, used to determine ifRobert Griesemer1-1/+5
a node fits on one line: - for purposes of measuring the node size in text, don't generate html or use a styler that could generate html as it will lead to overly large sizes A consequence of this bug is that source code displayed with godoc may show functions that fit on one line in the source on multiple lines. This change causes no difference to the gofmt formatting of any files in src or misc. R=rsc http://go/go-review/1026034
2009-11-08a nagging inconsistency: capitalization ofRuss Cox1-11/+11
HTML vs Html, URL vs Url, HTTP vs Http, current source is 6:1 in favor of the former, so change instances of the latter. R=r CC=go-dev http://go/go-review/1024026
2009-11-08assorted cleanupRuss Cox2-30/+12
R=r, iant CC=go-dev http://go/go-review/1025024
2009-11-08added package documentationRobert Griesemer1-0/+1
R=r, rsc http://go/go-review/1025023
2009-11-07- blank before opening { for multi-line composite literals (as preferred by r)Robert Griesemer1-14/+37
- blank padding around composite literal contents for a less dense look (most if not all composite literals were written in that style before gofmt ran through them) - corresponding (internal) flag: compositeLitBlank - don't print a semi after a one-statement statement list (as preferred by r) - corresponding (internal flag): fewerSemis - the number of changes in nodes.go is huge because of the removed semis; hg mail requires that I gofmt the file before With both flags set to false, this CL causes no gofmt formatting change. We can turn them on if we like it (and then remove the flags). Will submit with flags disabled. R=rsc, r http://go/go-review/1025015
2009-11-06format composite literal types that are "short" struct type literalsRobert Griesemer4-21/+123
on one line for a more compact representation of some composite Literals R=rsc http://go/go-review/1025008
2009-11-06- fine-tuning of one-line func heuristic (nodes.go)Robert Griesemer13-273/+153
- enabled for function declarations (not just function literals) - applied gofmt -w $GOROOT/src (look for instance at src/pkg/debug/elf/elf.go) R=r, rsc CC=go-dev http://go/go-review/1026006
2009-11-05gofmt the last outstanding files in src/pkgRobert Griesemer3-227/+255
- added a list of issues to printer/nodes.go R=rsc http://go/go-review/1024002
2009-11-05fix a comment formatting bug:Robert Griesemer3-2/+22
- this ensures better comment formatting in template.go and codec_test.go - it affects only 2 files of all files that have been gofmt'ed already, see separate CL (it fixes the same issue in those files) R=rsc http://go/go-review/1023002
2009-11-05gofmt'ed parts of goRobert Griesemer3-127/+137
R=rsc http://go/go-review/1023001
2009-11-052nd attempt: no noIndent for string listsRobert Griesemer5-20/+133
- slightly better output in general - extra indentation where we could do without (however that seems better for now that not having the indentation where it is needed) - no information is lost, so a future better approach can fix these places up again R=rsc http://go/go-review/1017050
2009-11-04more comment formatting:Robert Griesemer3-24/+160
- preserve (some) indentation of comment text for /*-style comments even if the first comment line does not contain any text that might suggest the "correct" indentation - enabled because otherwise existing larger comments get re-formatted (this will not introduce a lot of changes since comments of this kind - until now - were not changed with respect to indentation) R=rsc http://go/go-review/1016047
2009-11-04- add a blank before the opening { for multi-line compositesRobert Griesemer1-2/+15
(request by r) - feature temporarily disabled R=rsc CC=r http://go/go-review/1018052
2009-11-04gofmt-ify src/pkg/go (excluding printer directory due to pending CL,Robert Griesemer7-237/+285
and parser.go and scanner_test.go which have minor formatting issues) R=rsc http://go/go-review/1016042
2009-11-04rename testfiles from .go -> .orig so that they won't beRobert Griesemer7-8/+8
picked up by gofmt (they should not be modified) or godoc (testdata should not be considered a potential package directory) R=rsc http://go/go-review/1018045
2009-11-04better placement of /*-style comments interspersed with code on one lineRobert Griesemer4-10/+33
R=rsc http://go/go-review/1017030
2009-11-04- always format blocks with closing } on a new line, even if emptyRobert Griesemer4-54/+95
- at the moment this also affects single-line function declarations because we have disabled them at the moment (but not single-line function literals) R=rsc http://go/go-review/1016040
2009-11-04- complete html-escaping also in printer.goRobert Griesemer1-7/+12
R=rsc http://go/go-review/1017027
2009-11-04- respect source line breaks in grouped declarationsRobert Griesemer4-17/+120
- made ast.Spec nodes implement Node interface - added extra test cases R=rsc http://go/go-review/1016038
2009-11-03Note: This is an exact replica and replacement of CL 1018027Robert Griesemer1-0/+18
(which I uploaded at home and thus can't upload from here). CL 1018027 was reviewed. - added comments to scope.go - commented out some code that is not yet needed (and which showed up prominently in the documentation) R=rsc http://go/go-review/1017017
2009-11-03- don't loose extra line breaks in struct/interface declarationsRobert Griesemer4-11/+121
- start new sections if a field/method declaration spans multiple lines; this avoids tabs from the previous line affecting the next field/method R=rsc http://go/go-review/1017015
2009-11-02split printer.go into two files; it has become too large:Robert Griesemer3-1070/+1085
- nodes.go implements ast node formatting - printer.go implements the core printing functionality and public interface No code changes except for updating the import clauses and adding a top-level comment to nodes.go. R=rsc http://go/go-review/1016026
2009-11-02use the new routine regexp.MustCompile to clean up some code that uses ↵Rob Pike1-15/+2
global regexps. R=rsc, gri CC=go-dev http://go/go-review/1016025
2009-11-02- collect line comments for methods in interfacesRobert Griesemer2-12/+11
(previously not shown in godoc) - simplify parsing of struct types (match code structure for parsing interface types) R=rsc, r http://go/go-review/1016019
2009-11-01reverse the arguments to io.Copy so the destination is on theRob Pike1-1/+1
left, like an assignment, like strcpy, etc. R=rsc CC=go-dev http://go/go-review/1016011
2009-10-30improved comment formatting:Robert Griesemer8-168/+637
- print comments line by line, strip common prefix but do not modify comment contents otherwise - align comments with subsequent keyword if indicated (e.g. case labels) - terminate "column section" after multi-line expressions for better alignment R=rsc http://go/go-review/1017002
2009-10-28fix for long label names impacting column width of previous linesRobert Griesemer3-1/+40
R=rsc http://go/go-review/1013017
2009-10-27files that are okay from the last gofmt roundRuss Cox1-4/+4
R=gri http://go/go-review/1015011
2009-10-26- gofmt-ify walk.goRobert Griesemer1-44/+67
- fixed several bugs R=rsc http://go/go-review/1015015
2009-10-22Fix printer_test.go to invoke Fprint as a method of cfg.Ian Lance Taylor1-1/+1
This matches the change to printer.go in revision 3632. R=gri http://go/go-review/1015001
2009-10-22- make printer interface easily extensible w/o breaking clients (in the future)Robert Griesemer2-64/+73
- replacement for p4 CL 35999 (abandoned) R=rsc http://go/go-review/1012010
2009-10-22minor changes to walkRobert Griesemer1-59/+52
R=rsc http://go/go-review/1012008
2009-10-22simple AST walking supportRobert Griesemer2-0/+310
R=rsc http://go/go-review/1014006
2009-10-22go/printer:Robert Griesemer2-57/+83
- handle HTML tagging via (client-installable) Stylers go/doc: - basic styler support - some factoring - ready to contain the search code (but for now excluded) doc/style.css: - updated doc/go_spec.css: - cleanup: replace deprecated uses of <font> tag with <span> tag R=rsc DELTA=302 (160 added, 62 deleted, 80 changed) OCL=35973 CL=35996
2009-10-19support one-line functionsRobert Griesemer6-43/+161
R=rsc DELTA=207 (160 added, 42 deleted, 5 changed) OCL=35854 CL=35887
2009-10-15improved handling of expression listsRobert Griesemer7-70/+179
R=rsc DELTA=189 (118 added, 9 deleted, 62 changed) OCL=35816 CL=35821
2009-10-15close file after useRobert Griesemer1-0/+1
R=rsc DELTA=1 (1 added, 0 deleted, 0 changed) OCL=35778 CL=35780
2009-10-15- bug fix: must not insert indentation tabs into multi-line strings in RawFormatRobert Griesemer3-29/+221
(always write tabwriter.Escape chars so formatting is driven correctly; but strip them again in the end if no tabwriter is used) - added testcase for RawFormat printing R=rsc DELTA=227 (198 added, 6 deleted, 23 changed) OCL=35772 CL=35774
2009-10-15bug fix: do not modify (string) literals in any way even if theyRobert Griesemer3-38/+45
contain tabs or line breaks R=rsc DELTA=57 (19 added, 12 deleted, 26 changed) OCL=35749 CL=35770
2009-10-15Work-around for factory function heuristic failure:Robert Griesemer1-9/+27
only associate a couple of functions as factories for os.Error. Replaces CL 35628 (abandoned). R=rsc DELTA=35 (26 added, 0 deleted, 9 changed) OCL=35754 CL=35768
2009-10-13reduce stutter: sort.SortInterface -> sort.Interface.Rob Pike1-1/+1
ditto for heap.HeapInterface R=gri,rsc DELTA=31 (0 added, 1 deleted, 30 changed) OCL=35665 CL=35673
2009-10-12bug fix: convert \v's into \t's if there's no tabwriterRobert Griesemer1-3/+13
R=rsc DELTA=15 (12 added, 2 deleted, 1 changed) OCL=35641 CL=35645