Answer the question
In order to leave comments, you need to log in
How it is possible to pass for' on such type and whether it is possible?
There is such a ContactList type:
type Contact struct {
MemberId int `db:"member_id" json:"-"`
Name string `db:"name" json:"name"`
}
type ContactList []Contact
var contacts *interfaces.ContactList = repo.GetContactList()
for _, contact := range contacts {
...
}
Answer the question
In order to leave comments, you need to log in
Can. Try something.
Added
*interfaces.ContactList
no need to make a pointer to an array. Arrays are passed by pointer anyway.
Enough so
interfaces.ContactList
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question