1
0
mirror of https://github.com/duke-git/lancet.git synced 2026-02-04 12:52:28 +08:00

doc: add doc for new functions

This commit is contained in:
dudaodong
2023-09-07 16:03:08 +08:00
parent 19378ca4d1
commit f198711d1c
3 changed files with 673 additions and 1 deletions

View File

@@ -587,3 +587,63 @@ func ExampleIsJWT() {
// true
// false
}
func ExampleIsVisa() {
result1 := IsVisa("4111111111111111")
result2 := IsVisa("123")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// true
// false
}
func ExampleIsMasterCard() {
result1 := IsMasterCard("5425233430109903")
result2 := IsMasterCard("4111111111111111")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// true
// false
}
func ExampleIsAmericanExpress() {
result1 := IsAmericanExpress("342883359122187")
result2 := IsAmericanExpress("3782822463100007")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// true
// false
}
func ExampleIsUnionPay() {
result1 := IsUnionPay("6221263430109903")
result2 := IsUnionPay("3782822463100007")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// true
// false
}
func ExampleIsChinaUnionPay() {
result1 := IsChinaUnionPay("6250941006528599")
result2 := IsChinaUnionPay("3782822463100007")
fmt.Println(result1)
fmt.Println(result2)
// Output:
// true
// false
}