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

fixing nil check for validString check #96

Merged
merged 3 commits into from
Dec 13, 2019
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion oauth_client.go
Original file line number Diff line number Diff line change
Expand Up @@ -140,7 +140,7 @@ func (o OAuthClientCreateOptions) valid() error {
if o.ServiceProvider == nil {
return errors.New("service provider is required")
}
if o.PrivateKey != nil && *o.ServiceProvider != *ServiceProvider(ServiceProviderAzureDevOpsServer) {
if validString(o.PrivateKey) && *o.ServiceProvider != *ServiceProvider(ServiceProviderAzureDevOpsServer) {
return errors.New("Private Key can only be present with Azure DevOps Server service provider")
}
return nil
Expand Down