Compile a bug in an easily usable snapshot
()
| 125 | |
| 126 | // Compile a bug in an easily usable snapshot |
| 127 | func (bug *Bug) Compile() *Snapshot { |
| 128 | snap := &Snapshot{ |
| 129 | id: bug.Id(), |
| 130 | Status: common.OpenStatus, |
| 131 | } |
| 132 | |
| 133 | for _, op := range bug.Operations() { |
| 134 | op.Apply(snap) |
| 135 | snap.Operations = append(snap.Operations, op) |
| 136 | } |
| 137 | |
| 138 | return snap |
| 139 | } |
| 140 | |
| 141 | // FirstOp lookup for the very first operation of the bug. |
| 142 | // For a valid Bug, this operation should be a CreateOp |
nothing calls this directly
no test coverage detected