Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Using WithApi causes nil pointer #260

Open
dhuckins opened this issue May 14, 2024 · 0 comments
Open

Using WithApi causes nil pointer #260

dhuckins opened this issue May 14, 2024 · 0 comments

Comments

@dhuckins
Copy link

the comment // If nil is provided for the tlsConfig value, TLS will be disabled. indicates that passing in a nil tls config is valid but this would result in a pointer exception

// WithAPI credentials is an option that can be used to provide a custom
// configuration for the API endpoint.
//
// If nil is provided for the tlsConfig value, TLS will be disabled.
//
// This should only be necessary for development purposes.
func WithAPI(address string, tlsConfig *tls.Config) HCPConfigOption {
return func(config *hcpConfig) error {
config.apiAddress = address
config.apiTLSConfig = tlsConfig.Clone()
return nil
}
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant