11
12func UpdatePost(c *fiber.Ctx) error {
13 name := strings.TrimSpace(strings.ReplaceAll(c.Params("name"), "%20", " "))
14 field := strings.TrimSpace(strings.Title(strings.ToLower(c.Params("field"))))15 postId := c.Params("post_id")
16 newTitle := c.FormValue("title")
17 newDescription := c.FormValue("description")
20
21func GetProducts(c *fiber.Ctx) error {
22 name := strings.TrimSpace(strings.ReplaceAll(c.Params("name"), "%20", " "))
23 field := strings.TrimSpace(strings.Title(strings.ToLower(c.Params("field")))) 24 var products []db.Product
25
26 page := c.Params("page")
Sometimes a function, variable, constant, field, or whole package becomes redundant or unnecessary but must be kept for compatibility with existing programs. These should not be used except for compatibility with legacy systems.