TL;DR: The current host parsing function is non-idiomatic and hides errors opening the possibility for panics. We can't change the existing function without a breaking change so we will introduce a new function with signature func NewHost(hostname string) (*Host, error).
Description
See bug report: https://github.com/cli/cli/issues/9248
TL;DR: The current host parsing function is non-idiomatic and hides errors opening the possibility for panics. We can't change the existing function without a breaking change so we will introduce a new function with signature
func NewHost(hostname string) (*Host, error)
.https://github.com/cli/oauth/blob/adf5f733ffd14993aad9f3ff02c757a737f7c63b/oauth.go#L28-L36