예제 #1
0
// NewProduct instantiates a new Product
func NewProduct() *models.Product {
	var product models.Product
	product.ID = newID()
	return &product
}
예제 #2
0
// GetProduct reads a Product identified by id from database.
func GetProduct(id uuid.UUID) *models.Product {
	product := new(models.Product)
	product.Read(id)
	return product
}