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

Fix bearerauth example #697

Closed
wants to merge 1 commit into from

Conversation

JamesSlocumIH
Copy link

What type of PR is this?

  • documentation

What this PR does / why we need it:

The example for using a bearer auth token had two parameters flipped.
It should be (client, url) not (url, client)

Which issue(s) this PR fixes:

N/A

Special notes for your reviewer:

Additional documentation e.g., usage docs, etc.:

@andygrunwald
Copy link
Owner

@JamesSlocumIH The current function definition looks like (URL, client):

func NewClient(baseURL string, httpClient *http.Client) (*Client, error) {

Or am I missing something?

@JamesSlocumIH
Copy link
Author

Sorry I believe I got confused here:

  • This is the jira.NewClient(Client, Url) I was calling.
    • My go.mod pulled in 1.16.0 which is the linked version above
    • Thus my local go code thinks it needs to be the other way around
  • This example uses onpremise.NewClient(Url, Client)
    • But since I am using the NewClient version in 1.16.0, in doesn't recognize this new format

@JamesSlocumIH JamesSlocumIH deleted the patch-1 branch January 21, 2025 19:09
@andygrunwald
Copy link
Owner

Yeah, it could be that we changed it since the last tag. Thanks for pointing it out.

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