(propIdx int)
| 234 | } |
| 235 | |
| 236 | func (g *Graph) getProperty(propIdx int) string { |
| 237 | if propIdx >= len(g.properties) { |
| 238 | // Missing property, refresh property mapping table. |
| 239 | g.mutex.Lock() |
| 240 | |
| 241 | // Recheck now that we've got the lock. |
| 242 | if propIdx >= len(g.properties) { |
| 243 | g.properties = g.PropertyKeys() |
| 244 | |
| 245 | // Retry. |
| 246 | if propIdx >= len(g.properties) { |
| 247 | // Error! |
| 248 | panic("Unknown property index.") |
| 249 | } |
| 250 | } |
| 251 | g.mutex.Unlock() |
| 252 | } |
| 253 | |
| 254 | return g.properties[propIdx] |
| 255 | } |
| 256 | |
| 257 | // Procedures |
| 258 |
no test coverage detected