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