feat: deletar produtos

This commit is contained in:
2026-07-15 00:44:32 -03:00
parent 08c83157b1
commit 5eaa6d547f
3 changed files with 31 additions and 1 deletions
+7
View File
@@ -83,6 +83,13 @@ func ReadEditProductInput() (model.ProductID, string) {
return model.ProductID(productIDInt), field
}
func ReadDeleteProductInput() model.ProductID {
fmt.Print("Informe o Id do produto que deseja deletar: ")
productID, _ := reader.ReadString('\n')
productIDInt, _ := strconv.Atoi(strings.TrimSpace(productID))
return model.ProductID(productIDInt)
}
func ReadNewValueInput(field string) string {
fmt.Printf("Informe o novo valor para %s: ", field)