Skip to content

Commit

Permalink
validate.PortNubmer() min port is now 1
Browse files Browse the repository at this point in the history
  • Loading branch information
katbyte committed Aug 9, 2018
1 parent 9a2f801 commit 0aa1513
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion azurerm/helpers/validate/network.go
Original file line number Diff line number Diff line change
Expand Up @@ -53,7 +53,7 @@ func PortNumber(i interface{}, k string) (_ []string, errors []error) {
return
}

if v < 0 || 65535 < v {
if v < 1 || 65535 < v {
errors = append(errors, fmt.Errorf("%q is not a valid port number: %q", k, i))
}

Expand Down
2 changes: 1 addition & 1 deletion azurerm/helpers/validate/network_test.go
Original file line number Diff line number Diff line change
Expand Up @@ -162,7 +162,7 @@ func TestPortNumber(t *testing.T) {
},
{
Port: 0,
Errors: 0,
Errors: 1,
},
{
Port: 1,
Expand Down

0 comments on commit 0aa1513

Please sign in to comment.