func (cm CtMapper) UpdateCustomer(c dto.Customer) (ct orm.Customer) { ct = orm.RevertCustomer(c) db, _ := getCon() t := db.Save(&ct) fmt.Println(t) return }
//creates a customer func (cm CtMapper) CreateCustomer(c dto.Customer) (created bool) { //new orm for customer ct := orm.RevertCustomer(c) db, _ := getCon() res := db.Create(&ct) fmt.Printf("%+v\n", res) //if not probably because it didn't had a unique id created = res.RowsAffected > 0 return }