Ask your AI Ask your AI to turn this code into a guided bug-finding exercise.
Claude ChatGPT I am reading "A function calls `context.WithTimeout`. Name the returned function it must call to release resources even when the operation finishes early." on CodeWiki (https://codewiki.com/practice/fill/go/checkpoint-3/checkpoint-3-cancel-function/).
Context (verbatim from the page):
"""
A function calls `context.WithTimeout`. Name the returned function it must call to release resources even when the operation finishes early.
"""
Introduce three subtle bugs into the example above and let me find them. Reveal each answer only after I have guessed.
Answer in English. Keep code examples in Go. Where you are unsure, say so.