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
/
reflect.Type and reflect.Value
A method is declared as func (*Worker) Stop(). Which reflected receiver can expose it thr…
from reflect.Type and reflect.Value
Go 1.27
intermediate
3 min
A method is declared as func (*Worker) Stop(). Which reflected receiver can expose it through MethodByName?
reflect.ValueOf(&Worker{})
reflect.ValueOf(Worker{}) only
Both values always expose identical method sets.
MethodByName cannot find pointer-receiver methods.
Check
Ask AI about this kata
Report an error
next kata
Which check protects Value.Interface() when iterating fields that may be unexported?
Quiz
A new version is available
Reload