Skip to content

Commit

Permalink
Allow skipping scheme, fix regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
inferno-chromium committed Dec 22, 2020
1 parent c308663 commit 91780fd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions pkg/scorecard.go
Original file line number Diff line number Diff line change
Expand Up @@ -48,6 +48,11 @@ func (r *RepoURL) Type() string {
}

func (r *RepoURL) Set(s string) error {
// Allow skipping scheme for ease-of-use, default to https.
if !strings.Contains(s, "://") {
s = "https://" + s
}

u, e := url.Parse(s)
if e != nil {
return e
Expand Down

0 comments on commit 91780fd

Please sign in to comment.