tags:

views:

66

answers:

1

Having some maps defined as:

var valueToSomeType = map[uint8]someType{...}
var nameToSomeType = map[string]someType{...}

I would want a variable that points to the address of the maps (to don't copy all variable). I tried it using:

valueTo := &valueToSomeType
nameTo := &nameToSomeType

but at using valueTo[number], it shows
internal compiler error: var without type, init: new

How to get it?

Edit

The error was showed by another problem.

+2  A: 

Maps are reference types, so they are allways passed by reference. You don't need a pointer.

mue

Mue