reads the product of makeSymlink on Windows
(path string)
| 731 | |
| 732 | // reads the product of makeSymlink on Windows |
| 733 | func readPathFromFile(path string) (string, error) { |
| 734 | f, err := os.Open(path) |
| 735 | if err != nil { |
| 736 | return "", err |
| 737 | } |
| 738 | defer f.Close() |
| 739 | b := make([]byte, 1024) |
| 740 | n, err := f.Read(b) |
| 741 | return strings.TrimSpace(string(b[:n])), err |
| 742 | } |
| 743 | |
| 744 | func isBinExtension(client *http.Client, repo ghrepo.Interface) (isBin bool, err error) { |
| 745 | var r *release |