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
/
Go
A struct containing a slice is assigned to another variable. Which statement is correct?
from Go
intermediate
1 min
A struct containing a slice is assigned to another variable. Which statement is correct?
The outer struct is copied, but both slice fields can still refer to the same backing array.
The assignment recursively clones every element and nested value.
Struct assignment is forbidden whenever a field is a slice.
Check
Ask AI about this kata
Report an error
previous kata
Name the file at a module root that declares the module path and dependency requirements
Fill in
next kata
A nil `*ParseError` is stored in a variable of type `error`. What is true?
Quiz
A new version is available
Reload