()
| 393 | } |
| 394 | |
| 395 | func (model Model) Copy() Model { |
| 396 | newModel := NewModel() |
| 397 | |
| 398 | for sec, m := range model { |
| 399 | newAstMap := make(AssertionMap) |
| 400 | for ptype, ast := range m { |
| 401 | newAstMap[ptype] = ast.copy() |
| 402 | } |
| 403 | newModel[sec] = newAstMap |
| 404 | } |
| 405 | |
| 406 | return newModel |
| 407 | } |
| 408 | |
| 409 | func (model Model) GetFieldIndex(ptype string, field string) (int, error) { |
| 410 | assertion := model["p"][ptype] |
no test coverage detected