Skip to content

Commit

Permalink
fix: fix argument for package dir, update readme
Browse files Browse the repository at this point in the history
  • Loading branch information
zikani03 committed Jul 30, 2024
1 parent e175240 commit 0aa8ffb
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 8 deletions.
6 changes: 3 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -24,19 +24,19 @@ go install github.com/golang-malawi/geneveev@latest
**Generating Yup Schemas**

```sh
$ geneveev -d /path/to/package/with/validated/structs/ -output-dir ./yup-schemas
$ geneveev generate yup -d /path/to/package/with/validated/structs/ --output-dir ./yup-schemas
```

**Generating Zod Schemas**

```sh
$ geneveev -zod -d /path/to/package/with/validated/structs/ -output-dir ./zod-schemas
$ geneveev generate zod -d /path/to/package/with/validated/structs/ --output-dir ./zod-schemas
```

**Generating Dart classes**

```sh
$ geneveev -dart -d /path/to/package/with/validated/structs/ -output-dir ./dart-classes
$ geneveev generate dart -d /path/to/package/with/validated/structs/ --output-dir ./dart-classes
```

## Example
Expand Down
6 changes: 1 addition & 5 deletions main.go
Original file line number Diff line number Diff line change
Expand Up @@ -16,13 +16,9 @@ type Context struct {
Debug bool
}

type LsCmd struct {
Paths []string `arg:"" optional:"" name:"path" help:"Paths to list." type:"path"`
}

type GenerateCmd struct {
Format string `arg:"" type:"string" help:"Which format to generate to"`
PackageDir string `name:"d" type:"path" help:"package containing structs to generate from"`
PackageDir string `name:"" short:"d" type:"path" help:"package containing structs to generate from"`
OutputDir string `name:"" type:"path"`
Snakecase bool `name:"" help:"whether to name files as snake_case"`
}
Expand Down

0 comments on commit 0aa8ffb

Please sign in to comment.