Skip to content
CodeWiki
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
Search
⌘K
English
English
Chinese
Practice
Paths
Tracks
Cheatsheets
Playground
Glossary
AI era
English
English
Chinese
Practice
/
Quiz
/
Go
/
Methods
Given func (job *Job) Cancel(), which compile-time assertion can succeed for interface{ C…
from Methods
Go 1.27
intermediate
1 min
Given func (job *Job) Cancel(), which compile-time assertion can succeed for interface{ Cancel() }?
var _ interface{ Cancel() } = (*Job)(nil)
var _ interface{ Cancel() } = Job{}
var _ *Job = interface{ Cancel() }(nil)
Both Job{} and (*Job)(nil)
Check
Ask AI about this kata
Report an error
next kata
What does the saved method value print?
Predict the output
A new version is available
Reload