NewNameScope creates an empty name scope.
()
| 32 | |
| 33 | // NewNameScope creates an empty name scope. |
| 34 | func NewNameScope() *NameScope { |
| 35 | return &NameScope{ |
| 36 | names: make(map[string]string), |
| 37 | counts: make(map[string]int), |
| 38 | } |
| 39 | } |
| 40 | |
| 41 | // HashedUnique builds the unique name for key using name and - if not unique - |
| 42 | // appending suffix and - if still not unique - a counter value. It returns |
no outgoing calls