Пример #1
0
// NewCustomer instantiates a new Customer.
func NewCustomer() *models.Customer {
	var customer models.Customer
	customer.ID = newID()
	return &customer
}
Пример #2
0
// GetCustomer reads a Customer identified by id from database.
func GetCustomer(id uuid.UUID) *models.Customer {
	customer := new(models.Customer)
	customer.Read(id)
	return customer
}