Skip to content

Commit b0f6cc7

Browse files
mouismailBagToad
andauthored
Add deprecation notice on the old function
Co-authored-by: Kynan Ware <47394200+BagToad@users.noreply.github.com>
1 parent 165a129 commit b0f6cc7

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

Diff for: oauth.go

+2
Original file line numberDiff line numberDiff line change
@@ -45,6 +45,8 @@ func NewGitHubHost(hostURL string) (*Host, error) {
4545
}
4646

4747
// GitHubHost constructs a Host from the given URL to a GitHub instance.
48+
//
49+
// Deprecated: `GitHubHost` can panic with a malformed `hostURL`. Use `NewGitHubHost` instead for graceful error handling.
4850
func GitHubHost(hostURL string) *Host {
4951
u, _ := url.Parse(hostURL)
5052

0 commit comments

Comments
 (0)