Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Commit b4e48d5

Browse files
committed
reddit->https
1 parent ccf3f3f commit b4e48d5

File tree

1 file changed

+3
-3
lines changed

1 file changed

+3
-3
lines changed

src/logic/reddit.go

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ type RedditLogic struct {
2828
}
2929

3030
var DefaultReddit = RedditLogic{
31-
domain: "http://www.reddit.com",
31+
domain: "https://www.reddit.com",
3232
golang: "/r/golang/new/",
3333
}
3434

@@ -37,8 +37,8 @@ func (this *RedditLogic) Parse(redditUrl string) error {
3737
redditUrl = strings.TrimSpace(redditUrl)
3838
if redditUrl == "" {
3939
redditUrl = this.domain + this.golang
40-
} else if !strings.HasPrefix(redditUrl, "http") {
41-
redditUrl = "http://" + redditUrl
40+
} else if !strings.HasPrefix(redditUrl, "https") {
41+
redditUrl = "https://" + redditUrl
4242
}
4343

4444
var (

0 commit comments

Comments
 (0)