Answer the question
In order to leave comments, you need to log in
How to create a slice from a structure so that it can be read into with slqx Select?
There is such a code. I need to somehow create a slice from this structure so that I can do something like sm.Select(MakeSlice(base)). Tried like this - didn't work
Answer the question
In order to leave comments, you need to log in
var v []Personal
db.Select(&v,...)
type MyInterface interface{
MyMethod()
}
type Personals []Personal
func (p Personals) MyMethod() {}
func get() MyInterface {
var v Personals // equal []Personal
db.Select(&v,...)
return v
}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question