Skip to content

Commit

Permalink
Fix StatusCodeWithMessage to not use index out of range (#57)
Browse files Browse the repository at this point in the history
  • Loading branch information
jaswdr authored May 3, 2021
1 parent f2768c9 commit de8064a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion internet.go
Original file line number Diff line number Diff line change
Expand Up @@ -271,6 +271,6 @@ func (i Internet) StatusCodeMessage() string {

// StatusCodeWithMessage returns a fake status code with message for Internet
func (i Internet) StatusCodeWithMessage() string {
index := i.Faker.IntBetween(0, len(statusCodes))
index := i.Faker.IntBetween(0, len(statusCodes)-1)
return statusCodes[index] + " " + statusCodeMessages[index]
}

0 comments on commit de8064a

Please sign in to comment.