Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/panta/codicefiscale
Go library to check and decode Italian "Codice Fiscale".
https://github.com/panta/codicefiscale
Last synced: about 22 hours ago
JSON representation
Go library to check and decode Italian "Codice Fiscale".
- Host: GitHub
- URL: https://github.com/panta/codicefiscale
- Owner: panta
- License: apache-2.0
- Created: 2020-06-11T08:13:23.000Z (over 4 years ago)
- Default Branch: master
- Last Pushed: 2020-06-11T14:03:07.000Z (over 4 years ago)
- Last Synced: 2024-11-05T12:23:56.135Z (about 2 months ago)
- Language: Go
- Size: 301 KB
- Stars: 0
- Watchers: 3
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE.txt
Awesome Lists containing this project
README
# panta/codicefiscale
Small library to check and decode Italian "Codice Fiscale" from [Go](https://golang.org).
## Installation
First, use `go get` to install the latest version of the library:
```bash
go get -u github.com:panta/codicefiscale
```Then include the library in your code:
```go
import "panta/codicefiscale"
```## Usage
```go
package mainimport (
"fmt"
"time""github.com/panta/codicefiscale"
)func main() {
cf, err := codicefiscale.Decode("RSSMRA77L18H501W")
if err != nil {
panic(err)
}
fmt.Printf("Birth date: %s place: %s (%s)",
cf.BirthDate.Format(time.RFC3339),
cf.BirthPlaceName, cf.BirthPlace.Provincia.Nome)
}
```