make(map)和map {}之间的区别

Just wondering what the difference is between:

z := make(map[*test] string)

and

z := map[*test] string{}

am I imagining things or are they both not valid?

The Go Programming Language Specification

Making slices, maps and channels

The built-in function make takes a type T, which must be a slice, map or channel type, optionally followed by a type-specific list of expressions. It returns a value of type T (not *T). The memory is initialized as described in the section on initial values.

Call         Type T  Result
make(T)      map     map of type T
make(T, n)   map     map of type T with initial space for approximately n elements

Composite literals

Composite literals construct values for structs, arrays, slices, and maps and create a new value each time they are evaluated. They consist of the type of the literal followed by a brace-bound list of elements. Each element may optionally be preceded by a corresponding key.

map[string]int{}
map[string]int{"one": 1}

make is the canonical form. Composite literals are a convenient, alternate form.

z := make(map[int]string)

and

z := map[int]string{}

are equivalent.

Function make() and initializer of empty map are identical.

The same syntax may be used to initialize an empty map, which is functionally identical to using the make function:

m = map[string]int{}

from https://blog.golang.org/go-maps-in-action

Using pointer as map key is valid as pointer is comparable

Although, remember that values these pointers point to are not checked:

Pointer values are comparable. Two pointer values are equal if they point to the same variable or if both have value nil. Pointers to distinct zero-size variables may or may not be equal.