(path string)
| 672 | } |
| 673 | |
| 674 | func (d *Github) get(path string) (*Object, error) { |
| 675 | res, err := d.client.R().SetQueryParam("ref", d.Ref).Get(d.getContentApiUrl(path)) |
| 676 | if err != nil { |
| 677 | return nil, err |
| 678 | } |
| 679 | if res.StatusCode() != 200 { |
| 680 | return nil, toErr(res) |
| 681 | } |
| 682 | var resp Object |
| 683 | err = utils.Json.Unmarshal(res.Body(), &resp) |
| 684 | return &resp, err |
| 685 | } |
| 686 | |
| 687 | func (d *Github) putBlob(ctx context.Context, s model.FileStreamer, up driver.UpdateProgress) (string, error) { |
| 688 | beforeContent := "{\"encoding\":\"base64\",\"content\":\"" |
no test coverage detected