diff options
author | Russ Cox <rsc@golang.org> | 2009-04-06 21:28:04 -0700 |
---|---|---|
committer | Russ Cox <rsc@golang.org> | 2009-04-06 21:28:04 -0700 |
commit | f460c5c233a8ed87c2b6e5efc7202794e84022f1 (patch) | |
tree | 96684cc7d61274ff46cca10667e8d30a6af67a2c /src/old/c/obj.c | |
parent | 71a88a79ac75ccaca1986af7d3616563cbb2f74f (diff) | |
download | golang-f460c5c233a8ed87c2b6e5efc7202794e84022f1.tar.gz |
add method Value() Value to InterfaceValue.
use Value() in print to print underlying value
from interface.
before:
package main
import "fmt"
func main() {
x := []interface{} {1, "hello", 2.5};
fmt.Println(x[0], x[1], x[2], x);
}
1 hello 2.5 [<non-nil interface> <non-nil interface> <non-nil interface>]
after:
1 hello 2.5 [1 hello 2.5]
R=r
DELTA=44 (22 added, 16 deleted, 6 changed)
OCL=27139
CL=27141
Diffstat (limited to 'src/old/c/obj.c')
0 files changed, 0 insertions, 0 deletions