Skip to content

docs(go.md): fix an error in the sample code between aws-sdk-go-v2 and opensearch-go/v4 that caused code to not compile. #9584

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

Merged
merged 1 commit into from
Apr 9, 2025

Conversation

bootjp
Copy link
Contributor

@bootjp bootjp commented Apr 9, 2025

Description

This PR fixes an error in the Go client documentation sample code that caused it to not compile. The main issues were:

  1. Fixed import path from non-existent incorrect aws-sdk-go-v4 to correct aws-sdk-go-v2
  2. Fixed invalid module references with import path version suffixes that are not allowed by Go syntax
  3. Added missing return statement in the AWS credentials provider function for the OpenSearch Serverless example
  4. Added missing code to handle unused variables to prevent compile errors
  5. Minor formatting and whitespace fixes

As-Is: https://go.dev/play/p/QibehB7KI4r

To-Be: https://go.dev/play/p/5xJPsX8LFt2

Issues Resolved

N/A

Version

ALL

Frontend features

N/A

Checklist

  • By submitting this pull request, I confirm that my contribution is made under the terms of the Apache 2.0 license and subject to the Developers Certificate of Origin.
    For more information on following Developer Certificate of Origin and signing off your commits, please check here.

Copy link

github-actions bot commented Apr 9, 2025

Thank you for submitting your PR. The PR states are In progress (or Draft) -> Tech review -> Doc review -> Editorial review -> Merged.

Before you submit your PR for doc review, make sure the content is technically accurate. If you need help finding a tech reviewer, tag a maintainer.

When you're ready for doc review, tag the assignee of this PR. The doc reviewer may push edits to the PR directly or leave comments and editorial suggestions for you to address (let us know in a comment if you have a preference). The doc reviewer will arrange for an editorial review.

…d opensearch-go/v4 that caused code to not compile.

Signed-off-by: bootjp/Yoshiaki Ueda <[email protected]>
@bootjp bootjp force-pushed the feature/fix_golang_doc branch from 5784a88 to c06bb0a Compare April 9, 2025 06:03
Copy link
Collaborator

@kolchfa-aws kolchfa-aws left a comment

Choose a reason for hiding this comment

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

Thank you, @bootjp!

@kolchfa-aws kolchfa-aws merged commit 0b67148 into opensearch-project:main Apr 9, 2025
7 checks passed
opensearch-trigger-bot bot pushed a commit that referenced this pull request Apr 9, 2025
…d opensearch-go/v4 that caused code to not compile. (#9584)

Signed-off-by: bootjp/Yoshiaki Ueda <[email protected]>
(cherry picked from commit 0b67148)
Signed-off-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
github-actions bot pushed a commit that referenced this pull request Apr 9, 2025
…d opensearch-go/v4 that caused code to not compile. (#9584) (#9586)
@bootjp bootjp deleted the feature/fix_golang_doc branch April 10, 2025 04:49
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants