{"id":13412822,"url":"https://github.com/dixonwille/skywalker","last_synced_at":"2025-04-14T23:31:53.940Z","repository":{"id":41518279,"uuid":"99039045","full_name":"dixonwille/skywalker","owner":"dixonwille","description":"A package to allow one to concurrently go through a filesystem with ease","archived":false,"fork":false,"pushed_at":"2021-08-31T17:22:09.000Z","size":21,"stargazers_count":102,"open_issues_count":1,"forks_count":5,"subscribers_count":6,"default_branch":"master","last_synced_at":"2025-03-28T12:11:14.545Z","etag":null,"topics":["awesome-go","concurrency","filesystem","golang","golang-package"],"latest_commit_sha":null,"homepage":"","language":"Go","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"bsd-3-clause","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/dixonwille.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":".github/FUNDING.yml","license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null},"funding":{"github":"dixonwille"}},"created_at":"2017-08-01T20:08:25.000Z","updated_at":"2024-11-15T22:58:21.000Z","dependencies_parsed_at":"2022-08-26T04:11:29.284Z","dependency_job_id":null,"html_url":"https://github.com/dixonwille/skywalker","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dixonwille%2Fskywalker","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dixonwille%2Fskywalker/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dixonwille%2Fskywalker/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/dixonwille%2Fskywalker/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/dixonwille","download_url":"https://codeload.github.com/dixonwille/skywalker/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":248978866,"owners_count":21192862,"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":["awesome-go","concurrency","filesystem","golang","golang-package"],"created_at":"2024-07-30T20:01:29.659Z","updated_at":"2025-04-14T23:31:53.697Z","avatar_url":"https://github.com/dixonwille.png","language":"Go","funding_links":["https://github.com/sponsors/dixonwille"],"categories":["File Handling","文件处理","Files","Relational Databases","文件","\u003cspan id=\"文件-files\"\u003e文件 Files\u003c/span\u003e","文件处理`处理文件和文件系统操作的库`"],"sub_categories":["Search and Analytic Databases","检索及分析资料库","Advanced Console UIs","高級控制台界面","SQL 查询语句构建库","\u003cspan id=\"高级控制台用户界面-advanced-console-uis\"\u003e高级控制台用户界面 Advanced Console UIs\u003c/span\u003e","高级控制台界面"],"readme":"# skywalker [![GoDoc](https://godoc.org/github.com/dixonwille/skywalker?status.svg)](https://godoc.org/github.com/dixonwille/skywalker) [![Build Status](https://travis-ci.org/dixonwille/skywalker.svg?branch=master)](https://travis-ci.org/dixonwille/skywalker) [![Build status](https://ci.appveyor.com/api/projects/status/d1h7lpf0pv546amh?svg=true)](https://ci.appveyor.com/project/dixonwille/skywalker) [![codecov](https://codecov.io/gh/dixonwille/skywalker/branch/master/graph/badge.svg)](https://codecov.io/gh/dixonwille/skywalker) [![Go Report Card](https://goreportcard.com/badge/github.com/dixonwille/skywalker)](https://goreportcard.com/report/github.com/dixonwille/skywalker)\n\nSkywalker is a package to allow one to concurrently go through a filesystem with ease.\n\n## Features\n\n- Concurrency\n- BlackList filtering\n- WhiteList filtering\n- Filter by Directory\n- Filter by Extension\n- Glob Filtering (provided by [gobwas/glob](https://github.com/gobwas/glob))\n\n\u003e For matching to work properly across platforms. Please use `/`. In [gobwas/glob](https://github.com/gobwas/glob) the `\\` is an escape character (so you can escape `*`, `?`, etc...) making it difficult to know if you want to escape a character or go into directory.\n\n## Example\n\n```go\npackage main\n\nimport (\n    \"fmt\"\n    \"sort\"\n    \"strings\"\n    \"sync\"\n\n    \"github.com/dixonwille/skywalker\"\n)\n\ntype ExampleWorker struct {\n    *sync.Mutex\n    found []string\n}\n\nfunc (ew *ExampleWorker) Work(path string) {\n    //This is where the necessary work should be done.\n    //This will get concurrently so make sure it is thread safe if you need info across threads.\n    ew.Lock()\n    defer ew.Unlock()\n    ew.found = append(ew.found, path)\n}\n\nfunc main() {\n    //Following two functions are only to create and destroy data for the example\n    defer teardownData()\n    standupData()\n\n    ew := new(ExampleWorker)\n    ew.Mutex = new(sync.Mutex)\n\n    //root is the root directory of the data that was stood up above\n    sw := skywalker.New(root, ew)\n    sw.DirListType = skywalker.LTBlacklist\n    sw.DirList = []string{\"sub\"}\n    sw.ExtListType = skywalker.LTWhitelist\n    sw.ExtList = []string{\".pdf\"}\n    err := sw.Walk()\n    if err != nil {\n        fmt.Println(err)\n        return\n    }\n    sort.Sort(sort.StringSlice(ew.found))\n    for _, f := range ew.found {\n        fmt.Println(strings.Replace(f, sw.Root, \"\", 1))\n    }\n}\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdixonwille%2Fskywalker","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fdixonwille%2Fskywalker","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fdixonwille%2Fskywalker/lists"}