fix: set clientopts correctly in generate.go

This commit is contained in:
David Allen 2024-12-13 12:23:17 -07:00
parent 9951b9a1f3
commit cccf6321cc
Signed by: towk
GPG key ID: 793B2924A49B3A3F

View file

@ -81,12 +81,11 @@ var generateCmd = &cobra.Command{
} }
// set the client options // set the client options
opts := []client.Option{}
if conf.AccessToken != "" { if conf.AccessToken != "" {
params.ClientOpts = append(opts, client.WithAccessToken(conf.AccessToken)) params.ClientOpts = append(params.ClientOpts, client.WithAccessToken(conf.AccessToken))
} }
if conf.CertPath != "" { if conf.CertPath != "" {
params.ClientOpts = append(opts, client.WithCertPoolFile(conf.CertPath)) params.ClientOpts = append(params.ClientOpts, client.WithCertPoolFile(conf.CertPath))
} }
// run generator.Generate() with just plugin path and templates provided // run generator.Generate() with just plugin path and templates provided