[go-nuts] What's the difference between interface{} and *interface{}

2018-11-23 Thread 'yinbingjun' via golang-nuts
What's the difference between interface{} and *interface{} -- 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 opti

[go-nuts] recommend that error and panic auto coverting

2018-11-22 Thread 'yinbingjun' via golang-nuts
For an error function: data, err := error_func(…..) can be changed to panic style: data := panic error_func(……) And for a panic function: data := panic_func(……) can be changed to error style: data, err := error panic_func(…...) -- You received this message because you are subscribed to t

Re: [go-nuts] improve the reflection of golang

2018-11-20 Thread 'yinbingjun' via golang-nuts
sqlx does not support mutiple sql and results. > On Nov 20, 2018, at 14:26, Reto Brunner wrote: > > If you want to do that, there's already a package for it: > https://github.com/jmoiron/sqlx > > ``` > people := []Person{} > db.Select(&people, "SELECT * FROM person ORDER BY first_name ASC") >

[go-nuts] 3 important things that go should do first

2018-11-19 Thread 'yinbingjun' via golang-nuts
Recently I want to build a personal website using go, and I found it is very difficult. First go should support generic types. Generic types is very useful in ORM projects. If this make complex, go can borrow idea from java: only support generic types in language grammar and compiling time, n

Re: [go-nuts] improve the reflection of golang

2018-11-19 Thread 'yinbingjun' via golang-nuts
in database/sql rows.Scan(…) can only copy values to seperate variables, the style is not comfortable ,I want use a struct as database row. I want to use unexported database/sql.convertAssign, type Test struct { Name string Age int Email