Skip to content

Commit 1ddcff7

Browse files
committed
Automatically add http:// to homepage URLs
1 parent 879d9bb commit 1ddcff7

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

api/offer.go

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,9 @@ type offerResponse struct {
2828

2929
// Offer sends an offer API request.
3030
func Offer(licensor *data.Licensor, homepage, description string, private, relicense uint) (string, error) {
31+
if !strings.HasPrefix(homepage, "https://") && !strings.HasPrefix(homepage, "http://") {
32+
homepage = "http://" + homepage
33+
}
3134
bodyData := offerRequest{
3235
Action: "offer",
3336
LicensorID: licensor.LicensorID,

0 commit comments

Comments
 (0)