Age | Commit message (Collapse) | Author | Files | Lines | |
---|---|---|---|---|---|
2015-01-15 | Imported Upstream version 1.4upstream/1.4 | Tianon Gravi | 1 | -61/+0 | |
2011-09-13 | Imported Upstream version 60upstream/60 | Ondřej Surý | 1 | -0/+61 | |
2011-09-13 | Imported Upstream version 60 | Ondřej Surý | 1 | -61/+0 | |
2011-02-14 | Imported Upstream version 2011-02-01.1upstream/2011-02-01.1 | Ondřej Surý | 1 | -2/+2 | |
2010-06-14 | fmt.Print*: reimplement to switch on type first. | Rob Pike | 1 | -15/+15 | |
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-02-25 | %q in fmt: if the object is a Stringer, use String() to get the value to quote. | Rob Pike | 1 | -1/+1 | |
R=rsc CC=golang-dev http://codereview.appspot.com/224051 | |||||
2010-02-15 | Fix printing of named floating point types. | Ian Lance Taylor | 1 | -0/+61 | |
Try to avoid infinite recursion if String fails due to printing a bad type. Add test for String method with named basic types. R=r CC=golang-dev http://codereview.appspot.com/207102 |