Skip to content

akriventsev/go-card

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

12 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

Go Report Card

go-card

Basic credit card structure with validation using the Luhn algorithm

Installation

go get github.com/akriventsev/go-card

Quick Start

// 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()