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

Potentially misleading comment in README.md #260

Closed
marklkelly opened this issue Feb 11, 2021 · 2 comments · Fixed by #264
Closed

Potentially misleading comment in README.md #260

marklkelly opened this issue Feb 11, 2021 · 2 comments · Fixed by #264

Comments

@marklkelly
Copy link

marklkelly commented Feb 11, 2021

In the README

// Get the latest active version
latest, err := client.LatestVersion(&fastly.LatestVersionInput{
  ServiceID: serviceID,
})
if err != nil {
  log.Fatal(err)
}

The comment states Get the latest active version

Not sure if the expectation is that it would fetch the latest active version, but client.LatestVersion will fetch the latest version, regardless of its state (active or draft).

We should consider providing a helper to get the latest active version - or an update to README to demonstrate the correct way to fetch the active version.

@dkegel-fastly
Copy link
Contributor

This isn't quite fixed, the type of latest is wrong... I'd create a pull request if I had permissions to.

@Integralist
Copy link
Collaborator

Thanks @dkegel-fastly I've got a PR open to correct the README example now #275

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 a pull request may close this issue.

3 participants