get returns the current representation for bu, initializing it if necessary.
()
| 70 | |
| 71 | // get returns the current representation for bu, initializing it if necessary. |
| 72 | func (bu *Binutils) get() *binrep { |
| 73 | bu.mu.Lock() |
| 74 | r := bu.rep |
| 75 | if r == nil { |
| 76 | r = &binrep{} |
| 77 | initTools(r, "") |
| 78 | bu.rep = r |
| 79 | } |
| 80 | bu.mu.Unlock() |
| 81 | return r |
| 82 | } |
| 83 | |
| 84 | // update modifies the rep for bu via the supplied function. |
| 85 | func (bu *Binutils) update(fn func(r *binrep)) { |