Documentation
¶
Overview ¶
Package persiantools is an anthology of tools for working with Persian (Iranian) data in Go.
The module has no dependencies. It is organized as a set of focused sub-packages:
- bank validate card numbers, resolve banks, and check Sheba (IBAN) codes
- bill parse and validate Iranian utility bills
- digit convert digit sets, group and spell numbers, format money
- nationalid validate national numbers (code-e Melli) and resolve place
- phonenumbers validate and inspect Iranian mobile numbers
- text normalize Persian text, fix keyboard layouts, romanize
Import only the sub-packages you need, for example:
import "github.com/amiranmanesh/go-persian-tools/nationalid"
A command-line interface over every package is available too:
go install github.com/amiranmanesh/go-persian-tools/cmd/persian-tools@latest
Directories
¶
| Path | Synopsis |
|---|---|
|
Package bank validates Iranian bank card numbers, resolves the issuing bank and validates Sheba (IBAN) codes.
|
Package bank validates Iranian bank card numbers, resolves the issuing bank and validates Sheba (IBAN) codes. |
|
Package bill provides helpers to parse and validate Iranian utility bills (bill id / payment id pairs) and to derive their type, amount and barcode.
|
Package bill provides helpers to parse and validate Iranian utility bills (bill id / payment id pairs) and to derive their type, amount and barcode. |
|
cmd
|
|
|
persian-tools
command
Command persian-tools applies the transformations and validators of the go-persian-tools packages to text on the command line.
|
Command persian-tools applies the transformations and validators of the go-persian-tools packages to text on the command line. |
|
Package digit works with numbers in Persian text: converting between the ASCII, Persian and Arabic-Indic digit sets, extracting digits from mixed text, grouping amounts with either separator, spelling numbers out in Persian words, and formatting money in Toman or Rial.
|
Package digit works with numbers in Persian text: converting between the ASCII, Persian and Arabic-Indic digit sets, extracting digits from mixed text, grouping amounts with either separator, spelling numbers out in Persian words, and formatting money in Toman or Rial. |
|
internal
|
|
|
runeutil
Package runeutil holds the small rune helpers shared by the public packages.
|
Package runeutil holds the small rune helpers shared by the public packages. |
|
Package nationalid validates Iranian national numbers (code-e Melli) and resolves the issuing city and province from a national id.
|
Package nationalid validates Iranian national numbers (code-e Melli) and resolves the issuing city and province from a national id. |
|
Package phonenumbers validates Iranian mobile numbers, normalizes their prefix and resolves operator details from the number's prefix.
|
Package phonenumbers validates Iranian mobile numbers, normalizes their prefix and resolves operator details from the number's prefix. |
|
Package text provides utilities for working with Persian (Farsi) text.
|
Package text provides utilities for working with Persian (Farsi) text. |
Click to show internal directories.
Click to hide internal directories.