Skip to content

Commit

Permalink
fix: handle invalid port option
Browse files Browse the repository at this point in the history
Signed-off-by: Marko Kungla <[email protected]>
  • Loading branch information
mkungla committed Nov 28, 2022
1 parent b2a6c74 commit e8a27f2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion options.go
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ func APIVersion(version string) Option {
func Port(port uint16) Option {
return Option{
apply: func(c *Client) error {
if port != 80 && port != 443 {
if port >= 80 && port != 443 {
c.url.Host = fmt.Sprint(c.url.Hostname(), ":", port)
}
return nil
Expand Down

0 comments on commit e8a27f2

Please sign in to comment.