summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorCarlos Alexandro Becker <caarlos0@users.noreply.github.com>2024-07-11 12:02:03 -0300
committerCarlos Alexandro Becker <caarlos0@users.noreply.github.com>2024-07-11 12:02:03 -0300
commit247c707b25ad07808b5a8fc6830b78740fa89dca (patch)
tree7175b7254b8055cec06c3c3c32c208d0e03777a1
parentc356273a76f110d1b0b0aa128c82984abc9c2750 (diff)
fix: glow URL
closes #464
-rw-r--r--main.go6
1 files changed, 3 insertions, 3 deletions
diff --git a/main.go b/main.go
index 9876d16..fe0eb08 100644
--- a/main.go
+++ b/main.go
@@ -31,7 +31,6 @@ var (
CommitSHA = ""
readmeNames = []string{"README.md", "README", "Readme.md", "Readme", "readme.md", "readme"}
- readmeBranches = []string{"main", "master"}
configFile string
pager bool
style string
@@ -75,8 +74,9 @@ func sourceFromArg(arg string) (*source, error) {
// a GitHub or GitLab URL (even without the protocol):
src, err := readmeURL(arg)
- if src != nil || err != nil {
- return src, err
+ if src != nil && err == nil {
+ // if there's an error, try next methods...
+ return src, nil
}
// HTTP(S) URLs: