diff options
author | Carlos Alexandro Becker <caarlos0@users.noreply.github.com> | 2024-07-11 12:02:03 -0300 |
---|---|---|
committer | Carlos Alexandro Becker <caarlos0@users.noreply.github.com> | 2024-07-11 12:02:03 -0300 |
commit | 247c707b25ad07808b5a8fc6830b78740fa89dca (patch) | |
tree | 7175b7254b8055cec06c3c3c32c208d0e03777a1 | |
parent | c356273a76f110d1b0b0aa128c82984abc9c2750 (diff) |
fix: glow URL
closes #464
-rw-r--r-- | main.go | 6 |
1 files changed, 3 insertions, 3 deletions
@@ -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: |