m.Delete("/users/:id", func(params martini.Params) string { // get user id from params id := params["id"] // delete user from database db.DeleteUserById(id) return "User deleted successfully" })
m.Delete("/users", func() string { // delete all users from database db.DeleteAllUsers() return "All users deleted successfully" })In both examples, the `Delete` method is used to handle HTTP DELETE requests. The first example deletes a single user by their ID, while the second example deletes all users at once. The `db.DeleteUserById` and `db.DeleteAllUsers` functions are placeholders for actual database operations. Overall, the go-martini.martini ClassicMartini package is a versatile and intuitive web framework for Go that simplifies CRUD operations.