This pull request primarily focuses on improving error handling and code readability in the OAuth flow. The changes include the introduction of a new function NewGitHubHost in oauth.go to parse the host URL and return an error if parsing fails. This function is then used in the files examples_test.go, oauth_device.go, and oauth_webapp.go to replace the previous method of creating a new host, improving error handling in the process.
This pull request primarily focuses on improving error handling and code readability in the OAuth flow. The changes include the introduction of a new function
NewGitHubHost
inoauth.go
to parse the host URL and return an error if parsing fails. This function is then used in the filesexamples_test.go
,oauth_device.go
, andoauth_webapp.go
to replace the previous method of creating a new host, improving error handling in the process.