From 1a3cb0f04d44d7670f56127bb574eb30b97b3867 Mon Sep 17 00:00:00 2001 From: Mark Bates Date: Sun, 10 Nov 2019 18:59:20 -0500 Subject: [PATCH] update README.md --- README.md | 39 +++++++++++++++++++++++++++++++++++++++ 1 file changed, 39 insertions(+) diff --git a/README.md b/README.md index 1040189..68914d4 100644 --- a/README.md +++ b/README.md @@ -24,6 +24,45 @@ github.com/markbates/pkger:/cmd/pkger/main.go "github.com/gobuffalo/buffalo:/go.mod" => $GOPATH/pkg/mod/github.com/gobuffalo/buffalo@v0.14.7/go.mod ``` +## CLI + +### Installation + +```bash +$ go get github.com/markbates/pkger/cmd/pkger +$ pkger -h +``` + +### Usage + +```bash +$ pkger +``` + +The result will be a `pkged.go` file in the **root** of the module with the embedded information and the package name of the module. + +```go +// ./pkged.go +package <.> + +// Pkger stuff here +``` + +The `-o` flag can be used specify the directory of the `pkged.go` file. + +```bash +$ pkger -o cmd/reader +``` + +The result will be a `pkged.go` file in the **cmd/reader** folder with the embedded information and the package name of that folder. + +```go +// cmd/reader/pkged.go +package + +// Pkger stuff here +``` + ## Usage Pkger'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.