(name string, content []byte)
| 688 | } |
| 689 | |
| 690 | func fileContentResponseBytes(name string, content []byte) map[string]any { |
| 691 | return map[string]any{ |
| 692 | "type": "file", |
| 693 | "name": name, |
| 694 | "path": name, |
| 695 | "size": len(content), |
| 696 | "encoding": "base64", |
| 697 | "content": base64.StdEncoding.EncodeToString(content), |
| 698 | "sha": "deadbeef", |
| 699 | "url": "https://api.github.com/repos/OWNER/REPO/contents/" + name, |
| 700 | "git_url": "https://api.github.com/repos/OWNER/REPO/git/blobs/deadbeef", |
| 701 | "html_url": "https://github.com/OWNER/REPO/blob/main/" + name, |
| 702 | "download_url": "https://raw.githubusercontent.com/OWNER/REPO/main/" + name, |
| 703 | "_links": map[string]any{ |
| 704 | "self": "https://api.github.com/repos/OWNER/REPO/contents/" + name, |
| 705 | "git": "https://api.github.com/repos/OWNER/REPO/git/blobs/deadbeef", |
| 706 | "html": "https://github.com/OWNER/REPO/blob/main/" + name, |
| 707 | }, |
| 708 | } |
| 709 | } |
| 710 | |
| 711 | func pngBytes() []byte { |
| 712 | return append([]byte("\x89PNG\r\n\x1a\n"), make([]byte, 16)...) |
no outgoing calls
no test coverage detected