GetRandomNumber randomly returns an integer between 1 and the number specified.
(min int, max int)
| 292 | |
| 293 | // GetRandomNumber randomly returns an integer between 1 and the number specified. |
| 294 | func GetRandomNumber(min int, max int) int { |
| 295 | if min == max { |
| 296 | return 1 |
| 297 | } else if min > max { |
| 298 | return rand.Intn(max) + 1 |
| 299 | } |
| 300 | return rand.Intn(max-min) + min + 1 |
| 301 | } |
| 302 | |
| 303 | // GetDevfile returns a structure used to represent a specific devfile in a test |
| 304 | func GetDevfile(fileName string, follower DevfileFollower, validator DevfileValidator) (TestDevfile, error) { |
no outgoing calls
no test coverage detected