Skip to content

danhenderson95/luhn-check

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

4 Commits
 
 
 
 
 
 
 
 
 
 

Repository files navigation

luhn-check

A REST API that takes in a credit card number and checks if the card number is valid according to the Luhn algorithm.

https://en.wikipedia.org/wiki/Luhn_algorithm

How to use

go run main.go
curl http://localhost:3333/\?value=xxx

where "xxx" is the credit card number to test.

Response

The API returns a JSON object with the shape:

{"passes": result}

where "result" is a bool

Example

curl http://localhost:3333/\?value=4242424242424242
{"passes":true}

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published

Languages