{"id":21424351,"url":"https://github.com/gomodules/diffparser","last_synced_at":"2026-01-03T14:15:41.497Z","repository":{"id":57503002,"uuid":"73087286","full_name":"gomodules/diffparser","owner":"gomodules","description":"GOlang library for parsing git diffs","archived":false,"fork":false,"pushed_at":"2017-01-04T12:40:39.000Z","size":14,"stargazers_count":2,"open_issues_count":0,"forks_count":0,"subscribers_count":10,"default_branch":"master","last_synced_at":"2025-01-23T07:13:57.479Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"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/gomodules.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE.md","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2016-11-07T14:38:49.000Z","updated_at":"2019-06-03T17:33:32.000Z","dependencies_parsed_at":"2022-09-26T22:20:16.620Z","dependency_job_id":null,"html_url":"https://github.com/gomodules/diffparser","commit_stats":null,"previous_names":["appscode/diffparser"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomodules%2Fdiffparser","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomodules%2Fdiffparser/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomodules%2Fdiffparser/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/gomodules%2Fdiffparser/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/gomodules","download_url":"https://codeload.github.com/gomodules/diffparser/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":243933374,"owners_count":20370988,"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","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":"2024-11-22T21:21:20.563Z","updated_at":"2026-01-03T14:15:41.430Z","avatar_url":"https://github.com/gomodules.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![CLA assistant](https://cla-assistant.io/readme/badge/appscode/diffparser)](https://cla-assistant.io/appscode/diffparser)\n\n[Website](https://appscode.com) • [Slack](https://slack.appscode.com) • [Forum](https://discuss.appscode.com) • [Twitter](https://twitter.com/AppsCodeHQ)\n\nDiffParser\n===========\n\nDiffParser is a Golang package for parsing git diffs. This supports diffs containing binary files. This library is forked from http://github.com/waigani/diffparser\n\nInstall\n-------\n\n```sh\ngo get http://github.com/appscode/diffparser\n```\n\nUsage Example\n-------------\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/appscode/diffparser\"\n)\n\n// error handling left out for brevity\nfunc main() {\n\tbyt, _ := ioutil.ReadFile(\"example.diff\")\n\tdiff, _ := diffparser.Parse(string(byt))\n\n\t// You now have a slice of files from the diff,\n\tfile := diff.Files[0]\n\n\t// diff hunks in the file,\n\thunk := file.Hunks[0]\n\n\t// new and old ranges in the hunk\n\tnewRange := hunk.NewRange\n\n\t// and lines in the ranges.\n\tline := newRange.Lines[0]\n}\n```\n\nMore Examples\n-------------\n\nSee diffparser_test.go for further examples.\n\n\nCredits\n-------\nThis repository started as a fork of https://github.com/waigani/diffparser .\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgomodules%2Fdiffparser","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgomodules%2Fdiffparser","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgomodules%2Fdiffparser/lists"}