-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
45d7f4b
commit fa8855b
Showing
1 changed file
with
26 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1 +1,26 @@ | ||
# go-card | ||
|
||
# go-card | ||
|
||
Basic credit card structure with validation using the [Luhn algorithm](http://en.wikipedia.org/wiki/Luhn_algorithm) | ||
|
||
|
||
## Installation | ||
|
||
```bash | ||
go get github.com/anaximen/go-card | ||
``` | ||
|
||
## Quick Start | ||
|
||
```go | ||
// Initialize a new card: | ||
card,err := card.NewCard("4716339239466898", "334", 2023, 12, "Ivanov Ivan") | ||
|
||
if err!= nil { | ||
fmt.Print(err) | ||
} | ||
... | ||
|
||
expired := card.Expired() | ||
|
||
maskedNumber := card.MaskedNumber() |