Skip to content

Commit

Permalink
Add support for gitlab.com packages
Browse files Browse the repository at this point in the history
  • Loading branch information
harens committed Nov 28, 2022
1 parent 8e169ae commit 92e625c
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions go2port.go
Original file line number Diff line number Diff line change
Expand Up @@ -473,6 +473,9 @@ func rawFileUrl(pkg Package, dir string, file string) (string, error) {
case "git.sr.ht":
return fmt.Sprintf("https://git.sr.ht/%s/%s/blob/%s/%s/%s",
pkg.Author, pkg.Project, pkg.Version, dir, file), nil
case "gitlab.com":
return fmt.Sprintf("https://gitlab.com/%s/%s/-/raw/%s/%s/%s",
pkg.Author, pkg.Project, pkg.Version, dir, file), nil
default:
return "", errors.New(fmt.Sprintf("Unsupported domain: %s", pkg.Host))
}
Expand Down

0 comments on commit 92e625c

Please sign in to comment.