{"id":13645512,"url":"https://github.com/markbates/pkger","last_synced_at":"2025-09-29T00:32:30.714Z","repository":{"id":49309889,"uuid":"200081020","full_name":"markbates/pkger","owner":"markbates","description":"Embed static files in Go binaries (replacement for gobuffalo/packr)","archived":true,"fork":false,"pushed_at":"2021-08-27T21:34:43.000Z","size":51566,"stargazers_count":1190,"open_issues_count":60,"forks_count":56,"subscribers_count":13,"default_branch":"master","last_synced_at":"2025-09-11T05:56:06.160Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":"","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/markbates.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":"markbates","patreon":"buffalo"}},"created_at":"2019-08-01T16:03:23.000Z","updated_at":"2025-08-27T00:43:00.000Z","dependencies_parsed_at":"2022-07-29T23:09:53.027Z","dependency_job_id":null,"html_url":"https://github.com/markbates/pkger","commit_stats":null,"previous_names":[],"tags_count":36,"template":false,"template_full_name":null,"purl":"pkg:github/markbates/pkger","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fpkger","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fpkger/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fpkger/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fpkger/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/markbates","download_url":"https://codeload.github.com/markbates/pkger/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/markbates%2Fpkger/sbom","scorecard":{"id":619719,"data":{"date":"2025-08-11","repo":{"name":"github.com/markbates/pkger","commit":"0273362499c78b8d8ac7047eadd4f38454bc609a"},"scorecard":{"version":"v5.2.1-40-gf6ed084d","commit":"f6ed084d17c9236477efd66e5b258b9d4cc7b389"},"score":3.8,"checks":[{"name":"Code-Review","score":8,"reason":"Found 11/13 approved changesets -- score normalized to 8","details":null,"documentation":{"short":"Determines if the project requires human code review before pull requests (aka merge requests) are merged.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#code-review"}},{"name":"Maintained","score":0,"reason":"project is archived","details":["Warn: Repository is archived."],"documentation":{"short":"Determines if the project is \"actively maintained\".","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#maintained"}},{"name":"Dangerous-Workflow","score":10,"reason":"no dangerous workflow patterns detected","details":null,"documentation":{"short":"Determines if the project's GitHub Action workflows avoid dangerous patterns.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#dangerous-workflow"}},{"name":"Token-Permissions","score":0,"reason":"detected GitHub workflow tokens with excessive permissions","details":["Warn: no topLevel permission defined: .github/workflows/release.yml:1","Warn: no topLevel permission defined: .github/workflows/tests.yml:1","Info: no jobLevel write permissions found"],"documentation":{"short":"Determines if the project's workflows follow the principle of least privilege.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#token-permissions"}},{"name":"Binary-Artifacts","score":10,"reason":"no binaries found in the repo","details":null,"documentation":{"short":"Determines if the project has generated executable (binary) artifacts in the source repository.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#binary-artifacts"}},{"name":"CII-Best-Practices","score":0,"reason":"no effort to earn an OpenSSF best practices badge detected","details":null,"documentation":{"short":"Determines if the project has an OpenSSF (formerly CII) Best Practices Badge.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#cii-best-practices"}},{"name":"Security-Policy","score":0,"reason":"security policy file not detected","details":["Warn: no security policy file detected","Warn: no security file to analyze","Warn: no security file to analyze","Warn: no security file to analyze"],"documentation":{"short":"Determines if the project has published a security policy.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#security-policy"}},{"name":"Fuzzing","score":0,"reason":"project is not fuzzed","details":["Warn: no fuzzer integrations found"],"documentation":{"short":"Determines if the project uses fuzzing.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#fuzzing"}},{"name":"Packaging","score":-1,"reason":"packaging workflow not detected","details":["Warn: no GitHub/GitLab publishing workflow detected."],"documentation":{"short":"Determines if the project is published as a package that others can easily download, install, easily update, and uninstall.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#packaging"}},{"name":"License","score":10,"reason":"license file detected","details":["Info: project has a license file: LICENSE:0","Info: FSF or OSI recognized license: MIT License: LICENSE:0"],"documentation":{"short":"Determines if the project has defined a license.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#license"}},{"name":"Branch-Protection","score":0,"reason":"branch protection not enabled on development/release branches","details":["Warn: branch protection not enabled for branch 'master'"],"documentation":{"short":"Determines if the default and release branches are protected with GitHub's branch protection settings.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#branch-protection"}},{"name":"Signed-Releases","score":0,"reason":"Project has not signed or included provenance with any releases.","details":["Warn: release artifact v0.17.1 not signed: https://api.github.com/repos/markbates/pkger/releases/30777367","Warn: release artifact v0.17.0 not signed: https://api.github.com/repos/markbates/pkger/releases/27190657","Warn: release artifact v0.16.0 not signed: https://api.github.com/repos/markbates/pkger/releases/26576640","Warn: release artifact v0.15.1 not signed: https://api.github.com/repos/markbates/pkger/releases/25175795","Warn: release artifact v0.15.0 not signed: https://api.github.com/repos/markbates/pkger/releases/24438600","Warn: release artifact v0.17.1 does not have provenance: https://api.github.com/repos/markbates/pkger/releases/30777367","Warn: release artifact v0.17.0 does not have provenance: https://api.github.com/repos/markbates/pkger/releases/27190657","Warn: release artifact v0.16.0 does not have provenance: https://api.github.com/repos/markbates/pkger/releases/26576640","Warn: release artifact v0.15.1 does not have provenance: https://api.github.com/repos/markbates/pkger/releases/25175795","Warn: release artifact v0.15.0 does not have provenance: https://api.github.com/repos/markbates/pkger/releases/24438600"],"documentation":{"short":"Determines if the project cryptographically signs release artifacts.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#signed-releases"}},{"name":"SAST","score":0,"reason":"SAST tool is not run on all commits -- score normalized to 0","details":["Warn: 0 commits out of 30 are checked with a SAST tool"],"documentation":{"short":"Determines if the project uses static code analysis.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#sast"}},{"name":"Pinned-Dependencies","score":0,"reason":"dependency not pinned by hash detected -- score normalized to 0","details":["Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:14: update your workflow using https://app.stepsecurity.io/secureworkflow/markbates/pkger/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/release.yml:20: update your workflow using https://app.stepsecurity.io/secureworkflow/markbates/pkger/release.yml/master?enable=pin","Warn: third-party GitHubAction not pinned by hash: .github/workflows/release.yml:25: update your workflow using https://app.stepsecurity.io/secureworkflow/markbates/pkger/release.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:13: update your workflow using https://app.stepsecurity.io/secureworkflow/markbates/pkger/tests.yml/master?enable=pin","Warn: GitHub-owned GitHubAction not pinned by hash: .github/workflows/tests.yml:19: update your workflow using https://app.stepsecurity.io/secureworkflow/markbates/pkger/tests.yml/master?enable=pin","Warn: containerImage not pinned by hash: examples/dynamic/pkger/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/http/packr/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/http/pkger/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/http/std/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/open/packr/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/open/pkger/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/open/std/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/stat/pkger/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/stat/std/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/walk/packr/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/walk/pkger/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Warn: containerImage not pinned by hash: examples/walk/std/Dockerfile:1: pin your Docker image by updating alpine to alpine@sha256:4bcff63911fcb4448bd4fdacec207030997caf25e9bea4045fa6c8c44de311d1","Info:   0 out of   4 GitHub-owned GitHubAction dependencies pinned","Info:   0 out of   1 third-party GitHubAction dependencies pinned","Info:   0 out of  12 containerImage dependencies pinned"],"documentation":{"short":"Determines if the project has declared and pinned the dependencies of its build process.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#pinned-dependencies"}},{"name":"Vulnerabilities","score":10,"reason":"0 existing vulnerabilities detected","details":null,"documentation":{"short":"Determines if the project has open, known unfixed vulnerabilities.","url":"https://github.com/ossf/scorecard/blob/f6ed084d17c9236477efd66e5b258b9d4cc7b389/docs/checks.md#vulnerabilities"}}]},"last_synced_at":"2025-08-21T04:55:23.514Z","repository_id":49309889,"created_at":"2025-08-21T04:55:23.514Z","updated_at":"2025-08-21T04:55:23.514Z"},"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":277450939,"owners_count":25819971,"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","status":"online","status_checked_at":"2025-09-28T02:00:08.834Z","response_time":79,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"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-08-02T01:02:36.239Z","updated_at":"2025-09-29T00:32:30.365Z","avatar_url":"https://github.com/markbates.png","language":"Go","funding_links":["https://github.com/sponsors/markbates","https://patreon.com/buffalo"],"categories":["开源类库","others","Go","Open source library"],"sub_categories":["构建编译","Build And Compile"],"readme":"# Pkger\n\n[`github.com/markbates/pkger`](https://godoc.org/github.com/markbates/pkger) is a tool for embedding static files into Go binaries. It will, hopefully, be a replacement for [`github.com/gobuffalo/packr/v2`](https://godoc.org/github.com/gobuffalo/packr/v2).\n\n### Requirements\n\n* Go 1.13+\n* Go Modules\n\n## How it Works (Module Aware Pathing)\n\nPkger is powered by the dark magic of Go Modules, so they're like, totally required.\n\nWith Go Modules pkger can resolve packages with accuracy. No more guessing and trying to\nfigure out build paths, GOPATHS, etc... for this tired old lad.\n\nWith the module's path correctly resolved, it can serve as the \"root\" directory for that\nmodule, and all files in that module's directory are available.\n\nPaths:\n* Paths should use UNIX style paths:\n  `/cmd/pkger/main.go`\n* If unspecified the path's package is assumed to be the current module.\n* Packages can specified in at the beginning of a path with a `:` seperator.\ngithub.com/markbates/pkger:/cmd/pkger/main.go\n* There are no relative paths. All paths are absolute to the modules root.\n* Fully-qualified paths are embedded into the metadata of your static assets. If this behavior is undesirable, a preference is to build in a containerized environ, like docker, where the path strings are not ex-filtrating data about your development environment.\n\n```\n\"github.com/gobuffalo/buffalo:/go.mod\" =\u003e /go/pkg/mod/github.com/gobuffalo/buffalo@v0.14.7/go.mod\n```\n\n## CLI\n\n### Installation\n\n```bash\n$ go get github.com/markbates/pkger/cmd/pkger\n$ pkger -h\n```\n\n### Usage\n\n```bash\n$ pkger\n```\n\nThe result will be a `pkged.go` file in the **root** of the module with the embedded information and the package name of the module.\n\n```go\n// ./pkged.go\npackage \u003c.\u003e\n\n// Pkger stuff here\n```\n\nThe `-o` flag can be used to specify the directory of the `pkged.go` file.\n\n```bash\n$ pkger -o cmd/reader\n```\n\nThe result will be a `pkged.go` file in the **cmd/reader** folder with the embedded information and the package name of that folder.\n\n```go\n// cmd/reader/pkged.go\npackage \u003creader\u003e\n\n// Pkger stuff here\n```\n\n### Including Files at Package Time\n\nThere may be reasons where you don't reference a particular file, or folder, that you want embedded in your application, such as a build artifact.\n\nTo do this you may use either the [`github.com/markbates/pkger#Include`](https://godoc.org/github.com/markbates/pkger#Include) function to set a no-op parser directive to include the specified path.\n\nAlternatively, you may use the `-include` flag with the `pkger` and `pkger list` commands.\n\n```bash\n$ pkger list -include /actions -include github.com/gobuffalo/buffalo:/app.go\n\napp\n \u003e app:/actions\n \u003e app:/actions/actions.go\n \u003e app:/assets\n \u003e app:/assets/css\n \u003e app:/assets/css/_buffalo.scss\n \u003e app:/assets/css/application.scss\n \u003e app:/assets/images\n \u003e app:/assets/images/favicon.ico\n \u003e app:/assets/images/logo.svg\n \u003e app:/assets/js\n \u003e app:/assets/js/application.js\n \u003e app:/go.mod\n \u003e app:/locales/all.en-us.yaml\n \u003e app:/public\n \u003e app:/public/assets\n \u003e app:/public/assets/.keep\n \u003e app:/public/assets/app.css\n \u003e app:/public/images\n \u003e app:/public/images/img1.png\n \u003e app:/public/index.html\n \u003e app:/public/robots.txt\n \u003e app:/templates\n \u003e app:/templates/_flash.plush.html\n \u003e app:/templates/application.plush.html\n \u003e app:/templates/index.plush.html\n \u003e app:/web\n \u003e app:/web/web.go\n \u003e github.com/gobuffalo/buffalo:/app.go\n \u003e github.com/gobuffalo/buffalo:/logo.svg\n```\n\n## Reference Application\n\nThe reference application for the `README` examples, as well as all testing, can be found at [https://github.com/markbates/pkger/tree/master/pkging/pkgtest/testdata/ref](https://github.com/markbates/pkger/tree/master/pkging/pkgtest/testdata/ref).\n\n```\n├── actions\n│   └── actions.go\n├── assets\n│   ├── css\n│   │   ├── _buffalo.scss\n│   │   └── application.scss\n│   ├── images\n│   │   ├── favicon.ico\n│   │   └── logo.svg\n│   └── js\n│       └── application.js\n├── go.mod\n├── go.sum\n├── locales\n│   └── all.en-us.yaml\n├── main.go\n├── mod\n│   └── mod.go\n├── models\n│   └── models.go\n├── public\n│   ├── assets\n│   │   └── app.css\n│   ├── images\n│   │   └── img1.png\n│   ├── index.html\n│   └── robots.txt\n├── templates\n│   ├── _flash.plush.html\n│   ├── application.plush.html\n│   └── index.plush.html\n└── web\n    └── web.go\n\n13 directories, 20 files\n```\n\n\n## API Usage\n\nPkger's API is modeled on that of the [`os`](https://godoc.org/os) package in Go's standard library. This makes Pkger usage familiar to Go developers.\n\nThe two most important interfaces are [`github.com/markbates/pkger/pkging#Pkger`](https://godoc.org/github.com/markbates/pkger/pkging#Pkger) and [`github.com/markbates/pkger/pkging#File`](https://godoc.org/github.com/markbates/pkger/pkging#File).\n\n```go\ntype Pkger interface {\n  Parse(p string) (Path, error)\n  Current() (here.Info, error)\n  Info(p string) (here.Info, error)\n  Create(name string) (File, error)\n  MkdirAll(p string, perm os.FileMode) error\n  Open(name string) (File, error)\n  Stat(name string) (os.FileInfo, error)\n  Walk(p string, wf filepath.WalkFunc) error\n  Remove(name string) error\n  RemoveAll(path string) error\n}\n\ntype File interface {\n  Close() error\n  Info() here.Info\n  Name() string\n  Open(name string) (http.File, error)\n  Path() Path\n  Read(p []byte) (int, error)\n  Readdir(count int) ([]os.FileInfo, error)\n  Seek(offset int64, whence int) (int64, error)\n  Stat() (os.FileInfo, error)\n  Write(b []byte) (int, error)\n}\n```\n\nThese two interfaces, along with the [`os#FileInfo`](https://godoc.org/os#FileInfo), provide the bulk of the API surface area.\n\n### Open\n\n```go\nfunc run() error {\n\tf, err := pkger.Open(\"/public/index.html\")\n\tif err != nil {\n\t\treturn err\n\t}\n\tdefer f.Close()\n\n\tinfo, err := f.Stat()\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfmt.Println(\"Name: \", info.Name())\n\tfmt.Println(\"Size: \", info.Size())\n\tfmt.Println(\"Mode: \", info.Mode())\n\tfmt.Println(\"ModTime: \", info.ModTime())\n\n\tif _, err := io.Copy(os.Stdout, f); err != nil {\n\t\treturn err\n\t}\n\treturn nil\n}\n```\n\n### Stat\n\n```go\nfunc run() error {\n\tinfo, err := pkger.Stat(\"/public/index.html\")\n\tif err != nil {\n\t\treturn err\n\t}\n\n\tfmt.Println(\"Name: \", info.Name())\n\tfmt.Println(\"Size: \", info.Size())\n\tfmt.Println(\"Mode: \", info.Mode())\n\tfmt.Println(\"ModTime: \", info.ModTime())\n\n\treturn nil\n}\n```\n\n### Walk\n\n```go\nfunc run() error {\n\tw := tabwriter.NewWriter(os.Stdout, 0, 0, 0, ' ', tabwriter.Debug)\n\tdefer w.Flush()\n\n\treturn pkger.Walk(\"/public\", func(path string, info os.FileInfo, err error) error {\n\t\tif err != nil {\n\t\t\treturn err\n\t\t}\n\n\t\tfmt.Fprintf(w,\n\t\t\t\"%s \\t %d \\t %s \\t %s \\t\\n\",\n\t\t\tinfo.Name(),\n\t\t\tinfo.Size(),\n\t\t\tinfo.Mode(),\n\t\t\tinfo.ModTime().Format(time.RFC3339),\n\t\t)\n\n\t\treturn nil\n\t})\n\n}\n```\n\n## Understanding the Parser\n\nThe [`github.com/markbates/pkger/parser#Parser`](https://godoc.org/github.com/markbates/pkger/parser#Parser) works by statically analyzing the source code of your module using the [`go/parser`](https://godoc.org/go/parser) to find a selection of declarations.\n\nThe following declarations in your source code will tell the parser to embed files or folders.\n\n* `pkger.Dir(\"\u003cpath\u003e\")` - Embeds all files under the specified path.\n* `pkger.Open(\"\u003cpath\u003e\")` - Embeds the file, or folder, of the specified path.\n* `pkger.Stat(\"\u003cpath\u003e\")` - Embeds the file, or folder, of the specified path.\n* `pkger.Walk(\"\u003cpath\u003e\", filepath.WalkFunc)` - Embeds all files under the specified path.\n* `pkger.Include(\"\u003cpath\u003e\")` - `Include` is a no-op that directs the pkger tool to include the desired file or folder.\n\n### CLI Usage\n\nTo see what declarations the parser has found, you can use the `pkger parse` command to get a `JSON` list of the declarations.\n\n```bash\n$ pkger parse\n\n{\n \".\": [\n  {\n   \"file\": {\n    \"Abs\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/foo/bar/baz\",\n    \"Path\": {\n     \"Pkg\": \"app\",\n     \"Name\": \"/foo/bar/baz\"\n    },\n    \"Here\": {\n     \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref\",\n     \"ImportPath\": \"app\",\n     \"Module\": {\n      \"Path\": \"app\",\n      \"Main\": true,\n      \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref\",\n      \"GoMod\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/go.mod\",\n      \"GoVersion\": \"1.13\"\n     },\n     \"Name\": \"main\"\n    }\n   },\n   \"pos\": {\n    \"Filename\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/main.go\",\n    \"Offset\": 629,\n    \"Line\": 47,\n    \"Column\": 27\n   },\n   \"type\": \"pkger.MkdirAll\",\n   \"value\": \"/foo/bar/baz\"\n  },\n  {\n   \"file\": {\n    \"Abs\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/foo/bar/baz/biz.txt\",\n    \"Path\": {\n     \"Pkg\": \"app\",\n     \"Name\": \"/foo/bar/baz/biz.txt\"\n    },\n    \"Here\": {\n     \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref\",\n     \"ImportPath\": \"app\",\n     \"Module\": {\n      \"Path\": \"app\",\n      \"Main\": true,\n      \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref\",\n      \"GoMod\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/go.mod\",\n      \"GoVersion\": \"1.13\"\n     },\n     \"Name\": \"main\"\n    }\n   },\n   \"pos\": {\n    \"Filename\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/main.go\",\n    \"Offset\": 706,\n    \"Line\": 51,\n    \"Column\": 25\n   },\n   \"type\": \"pkger.Create\",\n   \"value\": \"/foo/bar/baz/biz.txt\"\n  },\n  ...\n ]\n}\n```\n\nFor a module aware list use the `pkger list` command.\n\n```bash\n$ pkger list\n\napp\n \u003e app:/assets\n \u003e app:/assets/css\n \u003e app:/assets/css/_buffalo.scss\n \u003e app:/assets/css/application.scss\n \u003e app:/assets/images\n \u003e app:/assets/images/favicon.ico\n \u003e app:/assets/images/logo.svg\n \u003e app:/assets/js\n \u003e app:/assets/js/application.js\n \u003e app:/go.mod\n \u003e app:/locales/all.en-us.yaml\n \u003e app:/public\n \u003e app:/public/assets\n \u003e app:/public/assets/.keep\n \u003e app:/public/assets/app.css\n \u003e app:/public/images\n \u003e app:/public/images/img1.png\n \u003e app:/public/index.html\n \u003e app:/public/robots.txt\n \u003e app:/templates\n \u003e app:/templates/_flash.plush.html\n \u003e app:/templates/application.plush.html\n \u003e app:/templates/index.plush.html\n \u003e app:/web\n \u003e app:/web/web.go\n \u003e github.com/gobuffalo/buffalo:/logo.svg\n```\n\nThe `-json` flag can be used to get a more detailed list in JSON.\n\n```bash\n$ pkger list -json\n\n{\n \"ImportPath\": \"app\",\n \"Files\": [\n  {\n   \"Abs\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/assets\",\n   \"Path\": {\n    \"Pkg\": \"app\",\n    \"Name\": \"/assets\"\n   },\n   \"Here\": {\n    \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/assets\",\n    \"ImportPath\": \"\",\n    \"Module\": {\n     \"Path\": \"app\",\n     \"Main\": true,\n     \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref\",\n     \"GoMod\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/go.mod\",\n     \"GoVersion\": \"1.13\"\n    },\n    \"Name\": \"assets\"\n   }\n  },\n  {\n   \"Abs\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/assets/css\",\n   \"Path\": {\n    \"Pkg\": \"app\",\n    \"Name\": \"/assets/css\"\n   },\n   \"Here\": {\n    \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/assets\",\n    \"ImportPath\": \"\",\n    \"Module\": {\n     \"Path\": \"app\",\n     \"Main\": true,\n     \"Dir\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref\",\n     \"GoMod\": \"/go/src/github.com/markbates/pkger/pkging/pkgtest/testdata/ref/go.mod\",\n     \"GoVersion\": \"1.13\"\n    },\n    \"Name\": \"assets\"\n   }\n  },\n  ...\n}\n```\n\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbates%2Fpkger","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fmarkbates%2Fpkger","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fmarkbates%2Fpkger/lists"}