Closed
Description
The tutorial at https://goswagger.io/tutorial/todo-list.html contains the following handler with an obvious race condition:
api.TodosDestroyOneHandler = todos.DestroyOneHandlerFunc(func(params todos.DestroyOneParams) middleware.Responder {
delete(items, params.ID)
return todos.NewDestroyOneNoContent()
})
The example code is quite different these days:
https://github.com/go-swagger/go-swagger/blob/master/examples/tutorials/todo-list/server-complete/restapi/configure_todo_list.go#L116
Should the tutorial be updated? And if so, should it match the example code exactly?