Make sqlboiler respect environment
- Stop failing on config file load, use the validation in the test config stuff.
This commit is contained in:
parent
1839b9fa03
commit
ac549c9207
3 changed files with 11 additions and 9 deletions
4
main.go
4
main.go
|
@ -64,8 +64,10 @@ func main() {
|
|||
rootCmd.PersistentFlags().StringP("output", "o", "models", "The name of the folder to output to")
|
||||
rootCmd.PersistentFlags().StringP("pkgname", "p", "models", "The name you wish to assign to your generated package")
|
||||
|
||||
viper.SetDefault("postgres.sslmode", "required")
|
||||
viper.SetDefault("postgres.sslmode", "require")
|
||||
viper.SetDefault("postgres.port", "5432")
|
||||
viper.BindPFlags(rootCmd.PersistentFlags())
|
||||
viper.AutomaticEnv()
|
||||
|
||||
if err := rootCmd.Execute(); err != nil {
|
||||
if e, ok := err.(commandFailure); ok {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue