mirror of
https://github.com/golang/go.git
synced 2025-12-08 06:10:04 +00:00
gc: clean up printing.
Got rid of all the magic mystery globals. Now for %N, %T, and %S, the flags +,- and # set a sticky debug, sym and export mode, only visible in the new fmt.c. Default is error mode. Handle h and l flags consistently with the least side effects, so we can now change things without worrying about unrelated things breaking. fixes #2361 R=rsc CC=golang-dev https://golang.org/cl/5316043
This commit is contained in:
parent
5842336089
commit
50110c9f83
23 changed files with 1693 additions and 1827 deletions
|
|
@ -434,7 +434,7 @@ func TestInterfaceGet(t *testing.T) {
|
|||
inter.E = 123.456
|
||||
v1 := ValueOf(&inter)
|
||||
v2 := v1.Elem().Field(0)
|
||||
assert(t, v2.Type().String(), "interface { }")
|
||||
assert(t, v2.Type().String(), "interface {}")
|
||||
i2 := v2.Interface()
|
||||
v3 := ValueOf(i2)
|
||||
assert(t, v3.Type().String(), "float64")
|
||||
|
|
@ -447,7 +447,7 @@ func TestInterfaceValue(t *testing.T) {
|
|||
inter.E = 123.456
|
||||
v1 := ValueOf(&inter)
|
||||
v2 := v1.Elem().Field(0)
|
||||
assert(t, v2.Type().String(), "interface { }")
|
||||
assert(t, v2.Type().String(), "interface {}")
|
||||
v3 := v2.Elem()
|
||||
assert(t, v3.Type().String(), "float64")
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue