In this case, list
is the name of the package, which you are importing via import "container/list"
, and its public members are upper case, like List
.
The rule is that public functions, types, etc., should be upper case.
You can alias imported packages however you want, but by default it is just the name of the last part of the package path--in this case, list
.
Update: It's not the last part of the package path. It's the actual package name (which is often the same thing).