(v *UploadRequest)
| 33 | } |
| 34 | |
| 35 | func (e *ulReqEncoder) Encode(v *UploadRequest) error { |
| 36 | e.data = v |
| 37 | |
| 38 | if len(v.Wants) == 0 { |
| 39 | return fmt.Errorf("empty wants provided") |
| 40 | } |
| 41 | |
| 42 | plumbing.HashesSort(e.data.Wants) |
| 43 | for state := e.encodeFirstWant; state != nil; { |
| 44 | state = state() |
| 45 | } |
| 46 | |
| 47 | return e.err |
| 48 | } |
| 49 | |
| 50 | func (e *ulReqEncoder) encodeFirstWant() stateFn { |
| 51 | var err error |
nothing calls this directly
no test coverage detected