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

update docs for GetAccessToken() and handle case where auth is nil #47

Merged
merged 1 commit into from
Jun 27, 2024

Conversation

k-capehart
Copy link
Owner

No description provided.

@k-capehart k-capehart merged commit a92950b into main Jun 27, 2024
1 check passed
@k-capehart k-capehart deleted the update-get-access-token-docs branch June 27, 2024 20:31
@@ -603,5 +603,8 @@ func (sf *Salesforce) GetJobResults(bulkJobId string) (BulkJobResults, error) {
}

func (sf *Salesforce) GetAccessToken() string {
return sf.auth.AccessToken
if sf.auth != nil {
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

       if sf.auth == nil { 
                return ""
        } 
        return sf.auth.AccessToken

Usually it's written like this for clarity purpose

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccoVeille Actually, that's a good point. I'll make that update.

@@ -93,6 +104,16 @@ if err != nil {
}
```

### GetAccessToken()

`func (sf *Salesforce) GetAccessToken() string`
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
`func (sf *Salesforce) GetAccessToken() string`
```go
func (sf *Salesforce) GetAccessToken() string
```

This way the code will be formatted with Go syntax

Copy link
Owner Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

@ccoVeille I was specifically not formatting it that way for the headers here, but its a good thing to note. Thank you.

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

Successfully merging this pull request may close these issues.

2 participants