Skip to content

Commit

Permalink
add TimeFormat to README
Browse files Browse the repository at this point in the history
  • Loading branch information
alehechka committed Jun 28, 2022
1 parent d0187d6 commit b379a2e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -37,6 +37,7 @@ json2go generate --url="https://gorest.co.in/public/v2/users"
| Root Object Name | `--root=RootObject` | `string` | Name for top-level object in JSON payload | `Root` |
| Package Name | `--package=api` | `string` | Name of package to generate types into. A nested package path is valid | `main` |
| Output File Name | `--output` | `string` | The name of the file that is generated. If a file is provided as input, will use matching name unless explicitly provided. The ".go" extension is not required and will be automatically appended. | `types.go` |
| Time Format | `--time=2006-01-02` | `string` | Time format to use while parsing strings for potential time.Time variables. View time.Time constants for possible defaults: https://pkg.go.dev/time#pkg-constants | `RFC3339` |
| Debug logging | `--debug` | `bool` | Will output debugging console logs. | `false` |
| Quiet | `--quiet` | `bool` | Will quiet fatal errors. | `false` |
| STDOUT | `--out` | `bool` | Instead of generating a Go file, will instead print the contents to STDOUT | `false` |
Expand Down
2 changes: 1 addition & 1 deletion cmd/generate.go
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ var generateFlags = []cli.Flag{
&cli.StringFlag{
Name: timeFormatFlag,
Aliases: []string{"t"},
Usage: "Time format to use while parsing strings for potential time.Time variables.",
Usage: "Time format to use while parsing strings for potential time.Time variables. View time.Time constants for possible defaults: https://pkg.go.dev/time#pkg-constants",
Value: time.RFC3339,
},
&cli.BoolFlag{
Expand Down

0 comments on commit b379a2e

Please sign in to comment.