{"id":37125396,"url":"https://github.com/ferdypruis/go-luhn","last_synced_at":"2026-01-14T14:30:00.123Z","repository":{"id":45364873,"uuid":"222723918","full_name":"ferdypruis/go-luhn","owner":"ferdypruis","description":"Create or validate a Lühn (mod 10) check digit in a numeric string in Go.","archived":false,"fork":false,"pushed_at":"2021-12-17T16:59:41.000Z","size":19,"stargazers_count":2,"open_issues_count":0,"forks_count":4,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-08-14T17:54:20.315Z","etag":null,"topics":["checksum","go","golang","luhn","mod10"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/ferdypruis.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2019-11-19T15:08:24.000Z","updated_at":"2022-10-05T11:54:05.000Z","dependencies_parsed_at":"2022-08-22T14:50:39.700Z","dependency_job_id":null,"html_url":"https://github.com/ferdypruis/go-luhn","commit_stats":null,"previous_names":[],"tags_count":3,"template":false,"template_full_name":null,"purl":"pkg:github/ferdypruis/go-luhn","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdypruis%2Fgo-luhn","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdypruis%2Fgo-luhn/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdypruis%2Fgo-luhn/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdypruis%2Fgo-luhn/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/ferdypruis","download_url":"https://codeload.github.com/ferdypruis/go-luhn/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/ferdypruis%2Fgo-luhn/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28423220,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T13:30:50.153Z","status":"ssl_error","status_checked_at":"2026-01-14T13:29:08.907Z","response_time":107,"last_error":"SSL_connect returned=1 errno=0 peeraddr=140.82.121.5:443 state=error: unexpected eof while reading","robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":false,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["checksum","go","golang","luhn","mod10"],"created_at":"2026-01-14T14:29:59.531Z","updated_at":"2026-01-14T14:30:00.111Z","avatar_url":"https://github.com/ferdypruis.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-luhn\n[![Build Status](https://travis-ci.com/ferdypruis/go-luhn.svg?branch=master)](https://travis-ci.com/ferdypruis/go-luhn)\n[![Go Reference](https://pkg.go.dev/badge/github.com/ferdypruis/go-luhn.svg)](https://pkg.go.dev/github.com/ferdypruis/go-luhn)\n\nCreate or validate a Lühn (mod 10) check digit in a numeric string in Go.\n\n## Examples\nChecksum returns the Lühn check digit for number.\n```go\nnumber := \"7992739871\"\n\ncheckdigit, _ := luhn.Checksum(number) // Ignoring error for simplicity\nfmt.Println(\"The Lühn check digit for\", number, \"is\", checkdigit)\n\n// Output:\n// The Lühn check digit for 7992739871 is 3\n```\n\nSign returns number with its Lühn check digit appended\n```go\nnumber := \"7992739871\"\n\nnumber, _ = luhn.Sign(number) // Ignoring error for simplicity\nfmt.Println(\"Your account number is\", number)\n\n// Output:\n// Your account number is 79927398713\n```\n\nValid returns whether number verifies against its appended check digit\n```go\nnumber := \"79927398713\"\n\nif luhn.Valid(number) {\n    fmt.Println(\"The number is valid\")\n} else {\n    fmt.Println(\"The number is not valid\")\n}\n\n// Output:\n// The number is valid\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdypruis%2Fgo-luhn","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fferdypruis%2Fgo-luhn","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fferdypruis%2Fgo-luhn/lists"}