{"id":31358308,"url":"https://github.com/leonsteinhaeuser/go-compare","last_synced_at":"2025-09-26T21:59:23.986Z","repository":{"id":130013107,"uuid":"442179421","full_name":"leonsteinhaeuser/go-compare","owner":"leonsteinhaeuser","description":"A library that can compare data types based on different \"match\" criterias.","archived":false,"fork":false,"pushed_at":"2023-02-16T23:08:46.000Z","size":14,"stargazers_count":1,"open_issues_count":0,"forks_count":0,"subscribers_count":1,"default_branch":"main","last_synced_at":"2024-06-20T03:46:23.096Z","etag":null,"topics":[],"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/leonsteinhaeuser.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,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2021-12-27T14:14:46.000Z","updated_at":"2023-03-05T06:59:24.000Z","dependencies_parsed_at":null,"dependency_job_id":"0b4a4bb5-2c61-4040-a15b-d31321d5fa66","html_url":"https://github.com/leonsteinhaeuser/go-compare","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"purl":"pkg:github/leonsteinhaeuser/go-compare","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Fgo-compare","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Fgo-compare/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Fgo-compare/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Fgo-compare/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/leonsteinhaeuser","download_url":"https://codeload.github.com/leonsteinhaeuser/go-compare/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/leonsteinhaeuser%2Fgo-compare/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277149974,"owners_count":25769492,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","status":"online","status_checked_at":"2025-09-26T02:00:09.010Z","response_time":78,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"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":[],"created_at":"2025-09-26T21:59:22.913Z","updated_at":"2025-09-26T21:59:23.979Z","avatar_url":"https://github.com/leonsteinhaeuser.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"# go-diff\n\n[![unit-tests](https://github.com/leonsteinhaeuser/go-compare/actions/workflows/unit-tests.yml/badge.svg)](https://github.com/leonsteinhaeuser/go-compare/actions/workflows/unit-tests.yml)\n[![codecov](https://codecov.io/gh/leonsteinhaeuser/go-compare/branch/main/graph/badge.svg?token=AENFLCI9NF)](https://codecov.io/gh/leonsteinhaeuser/go-compare)\n\nA library that can compare data types based on different \"match\" criterias.\n\nSupported match criterias:\n\n- less than\n- less than or equal\n- greater than\n- greater than or equal\n- percentage deviation\n- regex\n- range\n- equal\n- not equal\n- not empty\n- contains\n\n## Example\n\n```go\nfunc main() {\n    val := Validation{\n        MatchType: MatchTypeEqual\n        ExpectedValue: \"foo\",\n    }\n    isMatch, err := val.Matches(\"foo\")\n    if err != nil {\n        panic(err)\n    }\n    fmt.Printf(\"Compared %q against %q and got %v\", \"foo\", \"foo\", isMatch)\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonsteinhaeuser%2Fgo-compare","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fleonsteinhaeuser%2Fgo-compare","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fleonsteinhaeuser%2Fgo-compare/lists"}