The Go Programming Language Specification
A function type denotes the set of all functions with the same parameter and result types. The value of an uninitialized variable of function type is nil.
FunctionType = "func" Signature . Signature = Parameters [ Result ] . Result = Parameters | Type . Parameters = "(" [ ParameterList [ "," ] ] ")" . ParameterList = ParameterDecl { "," ParameterDecl } . ParameterDecl = [ IdentifierList ] [ "..." ] Type .
Within a list of parameters or results, the names (IdentifierList) must either all be present or all be absent. If present, each name stands for one item (parameter or result) of the specified type and all non-blank names in the signature must be unique. If absent, each type stands for one item of that type. Parameter and result lists are always parenthesized except that if there is exactly one unnamed result it may be written as an unparenthesized type.
import "container/list"
Package list implements a doubly linked list.
type Element struct { // The value stored with this element. Value interface{} // contains filtered or unexported fields }
Element is an element of a linked list.
type List struct { // contains filtered or unexported fields }
List represents a doubly linked list. The zero value for List is an empty list ready to use.
list
is a package name. The result type *list.List
is a pointer to type list.List
. The elements of type list.List
are of type list.Element
. For example,
package main
import "container/list"
func Map(value string) *list.List { return nil }
func main() {}