{"id":17725667,"url":"https://github.com/hirokisan/pagepath","last_synced_at":"2026-05-17T18:04:50.136Z","repository":{"id":168632204,"uuid":"644379930","full_name":"hirokisan/pagepath","owner":"hirokisan","description":"Golang library for handling and matching page paths","archived":false,"fork":false,"pushed_at":"2023-05-27T11:38:39.000Z","size":13,"stargazers_count":0,"open_issues_count":0,"forks_count":0,"subscribers_count":2,"default_branch":"main","last_synced_at":"2024-05-05T15:20:30.029Z","etag":null,"topics":["github","go","golang","matcher","page","path"],"latest_commit_sha":null,"homepage":"https://pkg.go.dev/github.com/hirokisan/pagepath","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/hirokisan.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},"funding":{"github":"hirokisan","patreon":null,"open_collective":null,"ko_fi":null,"tidelift":null,"community_bridge":null,"liberapay":null,"issuehunt":null,"otechie":null,"lfx_crowdfunding":null,"custom":null}},"created_at":"2023-05-23T11:54:30.000Z","updated_at":"2024-05-05T15:20:30.029Z","dependencies_parsed_at":"2023-05-28T11:00:14.456Z","dependency_job_id":null,"html_url":"https://github.com/hirokisan/pagepath","commit_stats":null,"previous_names":["hirokisan/pagepath"],"tags_count":1,"template":false,"template_full_name":null,"purl":"pkg:github/hirokisan/pagepath","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirokisan%2Fpagepath","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirokisan%2Fpagepath/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirokisan%2Fpagepath/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirokisan%2Fpagepath/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/hirokisan","download_url":"https://codeload.github.com/hirokisan/pagepath/tar.gz/refs/heads/main","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/hirokisan%2Fpagepath/sbom","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":264604678,"owners_count":23635920,"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":["github","go","golang","matcher","page","path"],"created_at":"2024-10-25T16:05:15.988Z","updated_at":"2026-05-17T18:04:50.024Z","avatar_url":"https://github.com/hirokisan.png","language":"Go","funding_links":["https://github.com/sponsors/hirokisan"],"categories":[],"sub_categories":[],"readme":"[![Go Report Card](https://goreportcard.com/badge/github.com/hirokisan/pagepath)](https://goreportcard.com/report/github.com/hirokisan/pagepath)\n[![golangci-lint](https://github.com/hirokisan/pagepath/actions/workflows/golangci-lint.yml/badge.svg)](https://github.com/hirokisan/pagepath/actions/workflows/golangci-lint.yml)\n[![test](https://github.com/hirokisan/pagepath/actions/workflows/test.yml/badge.svg)](https://github.com/hirokisan/pagepath/actions/workflows/test.yml)\n\n# pagepath\n\n`pagepath` is a Golang library for handling and matching page paths.\n\n## Usage\n\nGet element from page path\n\n```go\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/hirokisan/pagepath\"\n)\n\nfunc main() {\n\tpagePath := \"https://pkg.go.dev/net/url?xxx=bbb#Parse\"\n\n\thost, err := pagepath.Extract(pagePath, pagepath.ElementHost)\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\tfmt.Println(host) // pkg.go.dev\n}\n```\n\nCompare pages, for given elements\n\n```go\nimport (\n\t\"fmt\"\n\t\"log\"\n\n\t\"github.com/hirokisan/pagepath\"\n)\n\nfunc main() {\n\tmatcher := pagepath.NewMatcher()\n\n\tpage, err := pagepath.New(\"https://pkg.go.dev/net/url?xxx=bbb#Parse\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tcomparisonPage, err := pagepath.New(\"https://pkg.go.dev/net/url?xxx=bbb\")\n\tif err != nil {\n\t\tlog.Fatal(err)\n\t}\n\n\tfmt.Println(matcher.Compare(page, comparisonPage, pagepath.ElementPath)) // true\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirokisan%2Fpagepath","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fhirokisan%2Fpagepath","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fhirokisan%2Fpagepath/lists"}