Пример #1
0
func (model *DomainsModel) ScanItem(row db.ScannableStruct) (interface{}, error) {
	domainsItem := Domain{}
	err := row.Scan(
		&domainsItem.domain_id,
		&domainsItem.domain,
		&domainsItem.comment,
	)
	return domainsItem, err
}
Пример #2
0
func (model *ServicesModel) ScanItem(row db.ScannableStruct) (interface{}, error) {
	servicesItem := Service{}
	err := row.Scan(
		&servicesItem.service_id,
		&servicesItem.title,
		&servicesItem.addr,
	)
	return servicesItem, err
}