Having some maps defined as:
var valueToSomeType = map[uint8]someType{...}
var nameToSomeType = map[string]someType{...}
I would want a var
More specifically, from the Golang Specs:
Slices, maps and channels are reference types that do not require the extra indirection of an allocation with
new
.
The built-in function make takes a typeT
, which must be a slice, map or channel type, optionally followed by a type-specific list of expressions.
It returns a value of typeT
(not*T
).
The memory is initialized as described in the section on initial values
However, regarding function calls, the parameters are passed by value (always).
Except the value of a map parameter is a pointer.