// list the pointer of feilds of the struct of the model struct, usually use in the row.scan
// note that the model must be a pointer to a struct
list the pointer of feilds of the struct of the model struct, usually use in the row.scan
note that the model must be a pointer to a struct
// list the pointer of feilds of the struct of the model struct usually use in the row . scan // note that the model must be a pointer to a struct
func dbColumns(model interface{}) []interface{} {
	v := reflect.ValueOf(model).Elem()
	num := v.NumField()
	fields := make([]interface{}, num, num)
	for i := 0; i < num; i++ {
		fields[i] = v.Field(i).Addr().Interface()
	}
	return fields
}
func dbColumns ( model interface { } ) [ ] interface { } { v := reflect . ValueOf ( model ) . Elem ( ) num := v . NumField ( ) fields := make ( [ ] interface { } , num , num ) for i := 0 ; i < num ; i ++ { fields [ i ] = v . Field ( i ) . Addr ( ) . Interface ( ) } return fields }
list the pointer of feilds of the struct of the model struct, usually use in the row.scan
note that the model must be a pointer to a struct
list the pointer of feilds of the struct of the model struct usually use in the row . scan note that the model must be a pointer to a struct