(file *os.File)
| 239 | } |
| 240 | |
| 241 | func fileSize(file *os.File) (int64, error) { |
| 242 | stat, err := file.Stat() |
| 243 | if err != nil { |
| 244 | return 0, err |
| 245 | } |
| 246 | return stat.Size(), nil |
| 247 | } |
| 248 | |
| 249 | // Sends HTTP request to Github API |
| 250 | func doRequest(method, url, contentType string, reqBody io.Reader, bodySize int64) ([]byte, error) { |