Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Generate new URL string for each entry in
readmeNames
The code in `github.go` and `gitlab.go` mutates the same URL path making anything but the first attempt incorrect. This means the project at the moment only works for repositories that have `README.md` present. I added a debug log to `findGithubREADME` and tried to get the readme of one of my own projects (it has a readme.md) here is the output: ```shell $ go run . github.com/angadgill92/glow TRYING PATH /angadgill92/clean/master/README.md TRYING PATH /angadgill92/clean/master/README.md/master/README Error: can't find README in GitHub repository Usage: glow SOURCE [flags] Flags: -h, --help help for glow -p, --pager display with pager -s, --style string style name or JSON path (default "auto") --version version for glow -w, --width uint word-wrap at width exit status 255 ``` The reason for this is that we're doing ```go v := u v.Path += "/master/" + r ``` and on every iteration of the loop it adds `"/master/" + r` to whatever URL was generated in the last iteration. This makes every URL generated by `glow` after the first one invalid causing the error.
- Loading branch information