https://github.com/matriphe/nopol
Go package to check and format Indonesian vehicle registration number (police number)
https://github.com/matriphe/nopol
formatter go golang hacktoberfest indonesia plate-number vehicle-registration
Last synced: 9 days ago
JSON representation
Go package to check and format Indonesian vehicle registration number (police number)
- Host: GitHub
- URL: https://github.com/matriphe/nopol
- Owner: matriphe
- License: mit
- Created: 2018-03-10T05:41:39.000Z (over 8 years ago)
- Default Branch: master
- Last Pushed: 2018-05-13T10:43:44.000Z (about 8 years ago)
- Last Synced: 2025-02-28T02:23:24.216Z (over 1 year ago)
- Topics: formatter, go, golang, hacktoberfest, indonesia, plate-number, vehicle-registration
- Language: Go
- Homepage:
- Size: 4.88 KB
- Stars: 1
- Watchers: 2
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# Nopol
[](https://travis-ci.org/matriphe/nopol)
**Nopol** is Go package to check and format Indonesian vehicle registration number (police number).
It will format vehicle registration number format like this `{XX} {DDDD} {YYY}`, for example `AD 6742 DZ`, `CD 129` or `RI 1`.
For more info about Indonesian vehicle registration number, please refer to the [Wikipedia](https://en.wikipedia.org/wiki/Vehicle_registration_plates_of_Indonesia).
## Installation
```shell
go get -u github.com/matriphe/nopol
```
## Usage
```go
// Check validation
val := nopol.IsValid("AB 1234 XYZ") // return true
val := nopol.IsValid("ABC 12345") // return false
// Format
f, err := nopol.Format("AB1234-XYZ") // return AB 1234 XYZ, nil
f, err := nopol.Format("ABC12345") // return "", Not a valid police number
```
For more info, refer to [this documentation](https://godoc.org/github.com/matriphe/nopol).
## To Do
* Get information from the vehicle registration number
* Check validity of the vehicle registration number
## License
The MIT License (MIT). Please see [License File](LICENSE) for more information.