{"id":22911982,"url":"https://github.com/opencoff/go-walk","last_synced_at":"2025-05-09T01:33:38.454Z","repository":{"id":75757077,"uuid":"267975386","full_name":"opencoff/go-walk","owner":"opencoff","description":"Concurrent directory tree walker","archived":false,"fork":false,"pushed_at":"2024-09-30T01:12:09.000Z","size":76,"stargazers_count":4,"open_issues_count":0,"forks_count":2,"subscribers_count":1,"default_branch":"master","last_synced_at":"2025-03-31T20:39:11.261Z","etag":null,"topics":["concurrency","dirwalk","filesystem-library","filesystem-walk","golang","golang-dirwalk","golang-library"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"gpl-2.0","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/opencoff.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":"2020-05-29T23:36:23.000Z","updated_at":"2024-09-30T01:12:12.000Z","dependencies_parsed_at":"2024-04-18T17:50:36.932Z","dependency_job_id":"354bb255-1a30-43a9-91ce-c1ccff25c151","html_url":"https://github.com/opencoff/go-walk","commit_stats":null,"previous_names":[],"tags_count":18,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-walk","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-walk/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-walk/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/opencoff%2Fgo-walk/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/opencoff","download_url":"https://codeload.github.com/opencoff/go-walk/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":253174349,"owners_count":21865849,"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":["concurrency","dirwalk","filesystem-library","filesystem-walk","golang","golang-dirwalk","golang-library"],"created_at":"2024-12-14T04:19:28.681Z","updated_at":"2025-05-09T01:33:38.416Z","avatar_url":"https://github.com/opencoff.png","language":"Go","funding_links":[],"categories":[],"sub_categories":[],"readme":"[![GoDoc](https://godoc.org/github.com/opencoff/go-walk?status.svg)](https://godoc.org/github.com/opencoff/go-walk)\n# What is this\n\nThis is a concurrent directory traversal library. It returns each entry via\na channel or via a caller supplied function (ie callback). In either case,\nthe caller can specify what entries are interesting:\n\n* Files\n* Directories\n* Special files (symlinks, device nodes etc.)\n* All of the above\n\nIt can optionally follow symlinks and detect mount-point crossings.\n\n# How can I use it?\nHere is an example program:\n```go\n\n    dirs := []string{\"/etc\", \"/usr\", \"/bin\", \"/sbin\", \"/lib\"}\n    opt := walk.Options{\n            OneFS: true,\n            Type:  walk.FILE,\n            FollowSymlinks: true,\n    }\n\n    ch, errch := walk.Walk(dirs, \u0026opt)\n\n    go func() {\n        for err := range errch {\n            fmt.Printf(\"walk: error: %s\\n\", err)\n        }\n    }()\n\n    // harvest results\n    for r := range ch {\n        fmt.Printf(\"%s: %d bytes\\n\", r.Path, r.Stat.Size())\n    }\n\n```\n\nHere is an example using the `WalkFunc()` API:\n```go\n\n    dirs := []string{\"/etc\", \"/usr\", \"/bin\", \"/sbin\", \"/lib\"}\n    opt := walk.Options{\n            OneFS: true,\n            Type:  walk.FILE,\n            FollowSymlinks: true,\n    }\n\n    err := walk.WalkFunc(dirs, \u0026opt, func(r walk.Result) error {\n            fmt.Printf(\"%s: %d bytes\\n\", r.Path, r.Stat.Size())\n    })\n\n    if err != nil {\n        fmt.Printf(\"errors: %s\\n\", err)\n    }\n\n```\n\n# Who's using this?\n[go-progs](https://github.com/opencoff/go-progs) is a collection of go tools\n- many of which use this library.\n\n## Licensing Terms\nThe tool and code is licensed under the terms of the\nGNU Public License v2.0 (strictly v2.0). If you need a commercial\nlicense or a different license, please get in touch with me.\n\nSee the file ``LICENSE`` for the full terms of the license.\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoff%2Fgo-walk","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fopencoff%2Fgo-walk","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fopencoff%2Fgo-walk/lists"}