Skip to content

Commit

Permalink
Default to empty string for package flag, and use data source, provid…
Browse files Browse the repository at this point in the history
…er, or resource name as package name (#20)
  • Loading branch information
bendbennett committed Sep 4, 2023
1 parent b3e1d4e commit 0abce4a
Show file tree
Hide file tree
Showing 8 changed files with 8 additions and 3,889 deletions.
2 changes: 1 addition & 1 deletion internal/cmd/generate_all.go
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ func (cmd *GenerateAllCommand) Flags() *flag.FlagSet {
fs := flag.NewFlagSet("generate all", flag.ExitOnError)
fs.StringVar(&cmd.flagIRInputPath, "input", "", "path to intermediate representation (JSON)")
fs.StringVar(&cmd.flagOutputPath, "output", "./output", "directory path to output generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "provider", "name of Go package for generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "", "name of Go package for generated code files")

return fs
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/generate_data_sources.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (cmd *GenerateDataSourcesCommand) Flags() *flag.FlagSet {
fs := flag.NewFlagSet("generate data-sources", flag.ExitOnError)
fs.StringVar(&cmd.flagIRInputPath, "input", "./ir.json", "path to intermediate representation (JSON)")
fs.StringVar(&cmd.flagOutputPath, "output", "./output", "directory path to output generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "provider", "name of Go package for generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "", "name of Go package for generated code files")

return fs
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/generate_provider.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (cmd *GenerateProviderCommand) Flags() *flag.FlagSet {
fs := flag.NewFlagSet("generate provider", flag.ExitOnError)
fs.StringVar(&cmd.flagIRInputPath, "input", "./ir.json", "path to intermediate representation (JSON)")
fs.StringVar(&cmd.flagOutputPath, "output", "./output", "directory path to output generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "provider", "name of Go package for generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "", "name of Go package for generated code files")

return fs
}
Expand Down
2 changes: 1 addition & 1 deletion internal/cmd/generate_resources.go
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,7 @@ func (cmd *GenerateResourcesCommand) Flags() *flag.FlagSet {
fs := flag.NewFlagSet("generate resources", flag.ExitOnError)
fs.StringVar(&cmd.flagIRInputPath, "input", "./ir.json", "path to intermediate representation (JSON)")
fs.StringVar(&cmd.flagOutputPath, "output", "./output", "directory path to output generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "provider", "name of Go package for generated code files")
fs.StringVar(&cmd.flagPackageName, "package", "", "name of Go package for generated code files")

return fs
}
Expand Down
Loading

0 comments on commit 0abce4a

Please sign in to comment.