cuih
cuih
想自己用C++实现一遍
I have the same problem with you, And the author has not updated the project for a long time.
请问Parse()函数中为什么不用reflect的Elem()函数而用Indirect()函数呢
> @lcxc-lcxc > > > ```go > func TestSession_DeleteAndCount(t *testing.T) { > s := testRecordInit(t) > affected, _ := s.Where("Name = ?", "Tom").Delete() > count, _ := s.Count() > >...
> @tmphuang6 > func (s *Session) Find(values interface{}) error { > destSlice := reflect.Indirect(reflect.ValueOf(values)) > destType := destSlice.Type().Elem() > table := s.Model(reflect.New(destType).Elem().Interface()).RefTable() > > 会不会这样写 table := s.Model(reflect.New(destType).Interface()).RefTable() 好点 不会,因为需要destSlice,destType
> @WeiguoEric > ``` > func (m *methodType) newReplyv() reflect.Value { > // reply must be a pointer type > replyv := reflect.New(m.ReplyType.Elem()) > switch m.ReplyType.Elem().Kind() { > case reflect.Map:...
> @shawn0762 > NewService方法里面: > s.rcvr = reflect.ValueOf(rcvr) > s.name = reflect.Indirect(s.rcvr).Type().Name() > s.typ = reflect.TypeOf(rcvr) > > s.name为什么不用s.typ.Name()呢?请问这两者有什么区别 s.name执行在先
> @FOOLISH06 > 几点疑问和建议: > 1. GeeOrm 的不同功能在不同包中,而 Gee 的所有功能都在一个包里面,gorm v1 、 gorm v2 和 xorm 各有取舍,这两种方式哪种更好? > 2. log 包的取名容易让人误解为 go 官方的包,建议改名为 mylog 、logger 之类的。 > 3. 错误处理:例如下面的代码,错误已经在函数内处理了,为什么还要再返回呢? >...
> Hi @hunter01bird , > > Thanks for this feature request. As there are some upstream projects (Istio, Jenkins, etc.) that don't provide ARM images and support, the KubeSphere community...