Re: [go-nuts] [Go2] Reflect

2017-08-05 Thread Dan Kortschak
On Sat, 2017-08-05 at 09:58 -0700, Gert wrote:
> Reflect should be a generic way of Go2, but everytime i need to
> reflect 
> around a Go1 interface i want to go on a vacation...

Then the API is working!

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


[go-nuts] [Go2] Reflect

2017-08-05 Thread Gert
package main

import (
"fmt"
"reflect"
)

func main() {
x := 4
v1 := reflect.ValueOf(x)
fmt.Println("type:", v1.Type())
v2 := reflect.TypeOf(x)
fmt.Println("type:", v2)
}

Kan we have something like this instead please

package main

import (
"fmt"
"reflect"
)

func main() {
x := 4
r := reflect(x)
fmt.Println("type:", r.Type())
fmt.Println("value:", r.Value(int))
}

Reflect should be a generic way of Go2, but everytime i need to reflect 
around a Go1 interface i want to go on a vacation...

-- 
You received this message because you are subscribed to the Google Groups 
"golang-nuts" group.
To unsubscribe from this group and stop receiving emails from it, send an email 
to golang-nuts+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/d/optout.