{"id":16844191,"url":"https://github.com/bcicen/bfstree","last_synced_at":"2025-04-11T05:53:33.298Z","repository":{"id":76163996,"uuid":"118243858","full_name":"bcicen/bfstree","owner":"bcicen","description":"Go package providing breadth-first search functions for arbitrary structs","archived":false,"fork":false,"pushed_at":"2022-03-28T11:57:24.000Z","size":7,"stargazers_count":6,"open_issues_count":0,"forks_count":3,"subscribers_count":2,"default_branch":"master","last_synced_at":"2025-04-11T05:53:27.875Z","etag":null,"topics":["bfs","bfs-search","breadth","golang-library"],"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/bcicen.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":"2018-01-20T13:09:26.000Z","updated_at":"2024-09-13T18:00:27.000Z","dependencies_parsed_at":null,"dependency_job_id":"676e4036-b7dc-4b76-8b9e-4443ecdcd924","html_url":"https://github.com/bcicen/bfstree","commit_stats":null,"previous_names":[],"tags_count":1,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcicen%2Fbfstree","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcicen%2Fbfstree/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcicen%2Fbfstree/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/bcicen%2Fbfstree/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/bcicen","download_url":"https://codeload.github.com/bcicen/bfstree/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248351405,"owners_count":21089271,"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":["bfs","bfs-search","breadth","golang-library"],"created_at":"2024-10-13T12:54:55.581Z","updated_at":"2025-04-11T05:53:33.277Z","avatar_url":"https://github.com/bcicen.png","language":"Go","readme":"# bfstree\n\nSimple go package providing breadth-first search functions for arbitrary structs\n\n## Usage\n\n```go\npackage main\n\nimport (\n\t\"fmt\"\n\t\"github.com/bcicen/bfstree\"\n)\n\ntype FlightRoute struct {\n\tid       int\n\tfromCity string\n\ttoCity   string\n}\n\n// FlightRoute implements the bfstree.Edge interface\nfunc (f FlightRoute) From() string { return f.fromCity }\nfunc (f FlightRoute) To() string   { return f.toCity }\n\nfunc main() {\n\ttree := bfstree.New(\n\t\tFlightRoute{0, \"New York\", \"Chicago\"},\n\t\tFlightRoute{1, \"New York\", \"Los Angeles\"},\n\t\tFlightRoute{2, \"Los Angeles\", \"Houston\"},\n\t\tFlightRoute{3, \"Chicago\", \"Tokyo\"},\n\t)\n\n\tpath, err := tree.FindPath(\"New York\", \"Tokyo\")\n\tif err != nil {\n\t\tpanic(err)\n\t}\n\n\tfmt.Println(path)\n\n\tfor n, edge := range path.Edges() {\n\t\tfmt.Printf(\"flight %d: %s -\u003e %s\\n\", n+1, edge.From(), edge.To())\n\t}\n}\n```\n\noutput:\n```\nNew York-\u003eChicago-\u003eTokyo\nflight 1: New York -\u003e Chicago\nflight 2: Chicago -\u003e Tokyo\n```\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcicen%2Fbfstree","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fbcicen%2Fbfstree","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fbcicen%2Fbfstree/lists"}