summaryrefslogtreecommitdiff
path: root/src/pkg/fmt
AgeCommit message (Collapse)AuthorFilesLines
2015-01-15Imported Upstream version 1.4upstream/1.4Tianon Gravi8-5306/+0
2014-06-19Imported Upstream version 1.3upstream/1.3Michael Stapelberg5-152/+342
2013-12-03Imported Upstream version 1.2upstream/1.2Michael Stapelberg6-157/+342
2013-05-14Imported Upstream version 1.1upstream/1.1Michael Stapelberg3-3/+21
2013-03-04Imported Upstream version 1.1~hg20130304upstream/1.1_hg20130304Michael Stapelberg6-121/+269
2012-06-14Imported Upstream version 1.0.2upstream/1.0.2Ondřej Surý1-1/+1
2012-05-02Imported Upstream version 1.0.1upstream/1.0.1Ondřej Surý2-1/+4
2012-04-06Imported Upstream version 1upstream/1Ondřej Surý8-473/+693
2011-11-28Imported Upstream version 60.3upstream/60.3Ondřej Surý2-103/+160
2011-09-13Imported Upstream version 60upstream/60Ondřej Surý8-0/+4485
2011-09-13Imported Upstream version 60Ondřej Surý8-4469/+0
2011-08-03Imported Upstream version 59upstream/59Ondřej Surý6-35/+173
2011-06-30Imported Upstream version 58upstream/58Ondřej Surý6-22/+135
2011-04-28Imported Upstream version 2011.04.27upstream/2011.04.27Ondřej Surý4-25/+27
2011-04-26Imported Upstream version 2011.04.13upstream/2011.04.13Ondřej Surý5-100/+145
2011-04-20Imported Upstream version 2011.03.07.1upstream/2011.03.07.1Ondřej Surý6-146/+367
2011-02-18Imported Upstream version 2011.02.15upstream/2011.02.15Ondřej Surý3-38/+108
2011-02-14Imported Upstream version 2011-02-01.1upstream/2011-02-01.1Ondřej Surý7-134/+99
2011-01-17Imported Upstream version 2011.01.12upstream/2011.01.12Ondřej Surý7-654/+1079
2010-06-28fmt.Printf: fix bug in handling of %#v.Rob Pike3-63/+68
nice side effect: slices now obey their format verb. example: fmt.Printf("%q\n", []string{"a"}) R=rsc CC=golang-dev http://codereview.appspot.com/1729045
2010-06-24fmt.Scan: fix handling of EOFs.Rob Pike2-2/+53
Fixes issue 876. R=rsc CC=golang-dev http://codereview.appspot.com/1675048
2010-06-21reflect: add Type.Bits method, add tags to prohibit conversionsRuss Cox2-14/+17
gob: substitute slice for map R=r CC=golang-dev http://codereview.appspot.com/1699045
2010-06-20reflect: add Kind, remove Int8Type, Int8Value, etc.Russ Cox2-101/+30
update other code to match. R=r CC=golang-dev http://codereview.appspot.com/1680044
2010-06-18fmt.Scanf: improve error message when input does not match formatRob Pike2-4/+7
R=rsc CC=golang-dev http://codereview.appspot.com/1693043 Committer: Rob Pike <r@golang.org>
2010-06-15fmt.Scan: fix %c in the case where the input does not implement ReadRune itself.Rob Pike2-29/+100
While we're at it, clean up and test the code to guarantee we see every byte when the text is erroneous UTF-8. Fixes issue 866. R=rsc CC=golang-dev http://codereview.appspot.com/1712042
2010-06-14fmt.Printf: write tests for %T.Rob Pike2-1/+7
Fix a bug that caused it to ignore field widths. R=rsc CC=golang-dev http://codereview.appspot.com/1704041
2010-06-14fmt.Print*: reimplement to switch on type first.Rob Pike5-625/+456
This shortens, simplifies and regularizes the code significantly. (Improvements to reflect could make another step.) Passes all.bash. One semantic change occurs: The String() method changes behavior. It used to run only for string formats such as %s and %q. Instead, it now runs whenever the item has the method and the result is then processed by the format as a string. Besides the regularization, this has three effects: 1) width is honored for String() items 2) %x works for String() items 3) implementations of String that merely recur will recur forever Regarding point 3, example from the updated documentation: type X int func (x X) String() string { return Sprintf("%d", x) } should cast the value before recurring: func (x X) String() string { return Sprintf("%d", int(x)) } R=rsc CC=golang-dev http://codereview.appspot.com/1613045
2010-06-03fmt.Scan: %cRob Pike2-5/+23
R=rsc CC=golang-dev http://codereview.appspot.com/1518042
2010-06-03fmt.Scan: field widthsRob Pike3-122/+290
Also fix an interface bug: white-space-delimited doesn't work well for cases like "%d, %d" on "23, 23") R=rsc CC=golang-dev http://codereview.appspot.com/1502041
2010-06-02fmt.Scan: scan []byte argumentsRob Pike3-7/+34
R=rsc CC=golang-dev http://codereview.appspot.com/1486041
2010-06-02fmt.Scanf: implement formats, provide Sscanf (strings)Rob Pike3-56/+173
- provide convenience functions for scanning strings - enable Scanf etc. - update doc comments R=rsc CC=golang-dev http://codereview.appspot.com/1451044
2010-06-01fmt.Scan: renamings, strings, errorsRob Pike1-1/+1
- implement scanning for all renamed types (compiler bug stops complex from being renamable, so it can't be tested but the code is there) - %q %x for strings - error handling now done with panic/recover R=rsc CC=golang-dev http://codereview.appspot.com/1458041
2010-06-01fmt.Scan: renamings, strings, errorsRob Pike2-192/+409
- implement scanning for all renamed types (compiler bug stops complex from being renamable, so it can't be tested but the code is there) - %q %x for strings - error handling now done with panic/recover R=rsc CC=golang-dev http://codereview.appspot.com/1458041
2010-05-31fmt: fix end-of-array error in parsenum.Rob Pike2-8/+5
Fixes issue 821. R=rsc CC=golang-dev http://codereview.appspot.com/1434041
2010-05-31fmt.Scan: refactor the implementation so format-driven and normal scanning ↵Rob Pike2-160/+100
use the same function. simplifies the code significantly. Still TODO: - proper format handling - strings R=rsc CC=golang-dev http://codereview.appspot.com/1432041
2010-05-31fmt.Scan:Rob Pike2-154/+436
- reimplement integer scanning to handle renamed basic integer types - start implementation of Fscanf and Scanf; not yet ready for general use. This intermediate CL is a useful checkpoint. A similar change needs to be done for float and complex, but it seemed worth getting the approach reviewed before making those changes. R=rsc CC=golang-dev http://codereview.appspot.com/1418041
2010-05-28fmt.Scan: add Fscan and Fscanln and make Scan and ScanlnRob Pike3-12/+48
read from standard input. Add description of scanning to the package comment. R=rsc CC=golang-dev http://codereview.appspot.com/1390041
2010-05-27changes &x -> x[0:] for array to slice conversionRuss Cox3-3/+3
R=gri CC=golang-dev http://codereview.appspot.com/1326042
2010-05-26fmt.Scan: custom formattersRob Pike1-11/+11
R=rsc CC=golang-dev http://codereview.appspot.com/1315042
2010-05-26fmt.Scan: custom formattersRob Pike2-16/+76
R=rsc CC=golang-dev http://codereview.appspot.com/1315042
2010-05-26fmt: fix 386 build. error strings differ for overflow on 386.Rob Pike1-1/+3
R=gri CC=golang-dev http://codereview.appspot.com/1316042
2010-05-25fmt.Scan, fmt.Scanln: Start of a simple scanning API in the fmt package.Rob Pike3-0/+595
Still to do: - composite types - user-defined scanners - format-driven scanning The package comment will be updated when more of the functionality is in place. R=rsc CC=golang-dev http://codereview.appspot.com/1252045
2010-05-21go/printer, gofmt: fix printing of labels,Robert Griesemer1-1/+2
apply gofmt to src, misc Fixes issue 752. R=rsc CC=golang-dev http://codereview.appspot.com/1240044 Committer: Robert Griesemer <gri@golang.org>
2010-05-13Prevent Printf crashing when giving an extra nil argument.Roger Peppe1-2/+4
R=rsc, r CC=golang-dev http://codereview.appspot.com/1195041 Committer: Rob Pike <r@golang.org>
2010-04-28fmt: %T print <nil> for nilChristopher Wedgwood2-0/+5
R=r CC=golang-dev, rsc http://codereview.appspot.com/1014043 Committer: Rob Pike <r@golang.org>
2010-04-12fmt format verb %b bugAndrei Vieru3-9/+11
fmt.Printf("%b", int8(-1)) prints 64 ones instead of 8. This happens only for signed integers (int8, in16 and int32). I guess it's because of the way the conversion between integer types works. From go spec: "Conversions between integer types. If the value is a signed quantity, it is sign extended to implicit infinite precision ....". And there are several conversions to int64 and uint64 in the fmt package. This pathch solves only half of the problem. On a 32 bit system, an fmt.Printf("%b", int(-1)) should still print 64 ones. R=golang-dev, r CC=golang-dev http://codereview.appspot.com/891049 Committer: Rob Pike <r@golang.org>
2010-03-09fmt: enable the complex tests now that 8g supports complexRob Pike1-4/+0
R=rsc CC=golang-dev http://codereview.appspot.com/357043
2010-03-06fix bug in complex printing: imaginary didn't have same format as real.Rob Pike3-10/+47
add tests. R=rsc, ken2, ken3 CC=golang-dev http://codereview.appspot.com/261041
2010-03-06PTALKen Thompson2-65/+80
R=r CC=golang-dev http://codereview.appspot.com/254043
2010-03-056g complex type usableKen Thompson1-0/+120
8g and 5g have stubs to ignore complex R=rsc CC=golang-dev http://codereview.appspot.com/257042