How do struct{} and struct{}{} work in Go?

Viewed 9826

I am wondering what does "struct{}" and "struct{}{}" mean in Go? An example is as follows:

array[index] = struct{}{}

or

make(map[type]struct{})
2 Answers
Related