-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy pathwhatsapp_test.go
35 lines (31 loc) · 904 Bytes
/
whatsapp_test.go
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
package whatsapp
import (
"fmt"
)
// func main() {
// fmt.Println(IsCorrectAPIVersion("v16.1")) // true
// fmt.Println(IsCorrectAPIVersion("v21.0")) // true
// fmt.Println(IsCorrectAPIVersion("v15.9")) // false
// fmt.Println(IsCorrectAPIVersion("v100.0")) // true
//}
func ExampleIsCorrectAPIVersion() {
fmt.Println(IsCorrectAPIVersion("v16.1")) // true
fmt.Println(IsCorrectAPIVersion("v21.0")) // true
fmt.Println(IsCorrectAPIVersion("v15.9")) // false
fmt.Println(IsCorrectAPIVersion("v100.0")) // true
fmt.Println(IsCorrectAPIVersion("v0.0")) // false
fmt.Println(IsCorrectAPIVersion("v0.hello")) // false
fmt.Println(IsCorrectAPIVersion("vhi.1")) // false
fmt.Println(IsCorrectAPIVersion("v16.0")) // true
fmt.Println(IsCorrectAPIVersion("16.1")) // false
// Output:
// true
// true
// false
// true
// false
// false
// false
// true
// false
}