()
| 1160 | } |
| 1161 | |
| 1162 | func (t *TreeUpload) Wait() (*client.PutResult, error) { |
| 1163 | <-t.donec |
| 1164 | // If an error is waiting and we don't otherwise have one, use it: |
| 1165 | if t.err == nil { |
| 1166 | select { |
| 1167 | case t.err = <-t.errc: |
| 1168 | default: |
| 1169 | } |
| 1170 | } |
| 1171 | if t.err == nil && t.finalPutRes == nil { |
| 1172 | panic("Nothing ever set t.finalPutRes, but no error set") |
| 1173 | } |
| 1174 | return t.finalPutRes, t.err |
| 1175 | } |
| 1176 | |
| 1177 | type byTypeAndName []os.FileInfo |
| 1178 |
no outgoing calls