https://github.com/gospacedev/luhn
Luhn Module Verifier
https://github.com/gospacedev/luhn
go-mod go-module go-modules luhn luhn-algorithm luhn-checkdigit luhn-checksum luhn-validation
Last synced: about 2 months ago
JSON representation
Luhn Module Verifier
- Host: GitHub
- URL: https://github.com/gospacedev/luhn
- Owner: gospacedev
- License: mit
- Created: 2022-04-26T08:07:16.000Z (about 4 years ago)
- Default Branch: main
- Last Pushed: 2022-10-15T03:19:07.000Z (over 3 years ago)
- Last Synced: 2024-06-22T18:53:00.194Z (almost 2 years ago)
- Topics: go-mod, go-module, go-modules, luhn, luhn-algorithm, luhn-checkdigit, luhn-checksum, luhn-validation
- Language: Go
- Homepage:
- Size: 25.4 KB
- Stars: 2
- Watchers: 0
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# luhn-formula
[](https://opensource.org/licenses/mit-license.php)
Luhn Formula is a go module that uses the luhn aglorithm also known as Modulus 10 Algorithm to verify if a number is a luhn number
## Usage
To get:
```
go get github.com/gospacedev/luhn-formula
```
You can use it as:
```go
package main
import (
"fmt"
"github.com/gospacedev/luhn-formula"
)
func main() {
a := luhn.Check("79927398713")
b := luhn.Check("1111")
fmt.Println(a)
fmt.Println(b)
}
```
The output will be:
```
true
false
```