forked from persian-tools/go-persian-tools
-
Notifications
You must be signed in to change notification settings - Fork 0
/
main.go
43 lines (38 loc) · 1.57 KB
/
main.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
36
37
38
39
40
41
42
43
package main
import (
"fmt"
"github.com/h-varmazyar/gopet/bank"
bills "github.com/h-varmazyar/gopet/bill"
digits "github.com/h-varmazyar/gopet/digit"
"github.com/h-varmazyar/gopet/national_id"
)
func main() {
currency_param := bills.Currency{false, false}
params := bills.BillParams{1117753200140, 12070160, currency_param, "1"}
params2 := bills.BillParams{7748317800142, 1770160, currency_param, "1"}
result := bills.GetBillType(params)
amount := bills.GetCurrency(params)
barcode := bills.GetBarCode(params)
verify := bills.VerifyBillID(params2)
verifyIranianNationalId := national_id.Validate("0067749828")
verifyIranianNationalIdFalse := national_id.Validate("0684159415")
num2word := digits.DigitToWord("۱۵۶۷۸۹")
shebaCode := bank.ShebaCode{"IR820540102680020817909002"}
bank, _ := bank.CardInfo("6037701689095443")
sheba := shebaCode.IsSheba()
getPlaceByIranNationalId := national_id.GetPlaceByIranNationalId("059499370899")
addComma := digits.AddCommas(14555478854)
removeComma := digits.RemoveCommas("4,555,522,212,12")
fmt.Printf("\n %v \n", result)
fmt.Printf("\n %v \n", amount)
fmt.Printf("\n %v \n", num2word)
fmt.Printf("\n %v \n", barcode)
fmt.Printf("\n %v \n", verify)
fmt.Printf("\n Verify : %v \n", bank)
fmt.Printf("\n SHEBA : %v \n", sheba)
fmt.Printf("\n ADD COMMA : %v \n", addComma)
fmt.Printf("\n REMOVE COMMA : %v \n", removeComma)
fmt.Printf("\n Cities : %v \n", getPlaceByIranNationalId)
fmt.Printf("\n Validate NationalID : %v \n", verifyIranianNationalId)
fmt.Printf("\n Validate NationalIDFalse : %v \n", verifyIranianNationalIdFalse)
}