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

feat: Support Go #267

Merged
merged 1 commit into from
Jul 31, 2024
Merged

feat: Support Go #267

merged 1 commit into from
Jul 31, 2024

Conversation

lym953
Copy link
Contributor

@lym953 lym953 commented Jul 31, 2024

What does this PR do?

Support Golang.

Some details:

  • creates a git tag v2-1.14.0 to make this commit found easily when we later send it to Go package library
  • makes gitignore un-ignore /dist/go, where the Go package is outputted, so the Go package code can be tracked by Git and uploaded. Currently the entire /dist folder is ignored.
  • adds /dist/go to .gitattributes so that these generated files will be collapsed on GitHub, to avoid making code review difficult.

Motivation

From Feature Request: Datadog CDK Construct for Go

Testing Guidelines

I don't know a way to test it at this stage.
My planned next steps are:

  1. After this PR is merged, visit https://pkg.go.dev/github.com/DataDog/datadog-cdk-constructs@v2-1.14.0 to request Go package library to include this repo
  2. Install this package in a Go project and test it.
  3. Update README.md
  4. Write a release note for v2-1.14.0

Please let me know if there's a good way to test it at this state, or there are other next steps I should take.

Additional Notes

Types of Changes

  • Bug fix
  • New feature
  • Breaking change
  • Misc (docs, refactoring, dependency upgrade, etc.)

Check all that apply

  • This PR's description is comprehensive
  • This PR contains breaking changes that are documented in the description
  • This PR introduces new APIs or parameters that are documented and unlikely to change in the foreseeable future
  • This PR impacts documentation, and it has been updated (or a ticket has been logged)
  • This PR's changes are covered by the automated tests
  • This PR collects user input/sensitive content into Datadog

@lym953 lym953 requested review from a team as code owners July 31, 2024 19:43
@lym953 lym953 force-pushed the yiming.luo/support-golang branch from 8a9bd32 to 39be4b5 Compare July 31, 2024 19:47
@lym953 lym953 changed the title Support Go feat: Support Go Jul 31, 2024
Copy link
Contributor

@astuyve astuyve left a comment

Choose a reason for hiding this comment

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

This looks awesome, thanks!! Let's make sure that publishing to npm is unaffected but I think the script should be fine, tsc SHOULD blow away the dist directory and then re-build.

Sweet!

@lym953 lym953 force-pushed the yiming.luo/support-golang branch from 39be4b5 to 7efd263 Compare July 31, 2024 20:25
@lym953
Copy link
Contributor Author

lym953 commented Jul 31, 2024

Renamed the Go package from datadog-cdk-constructs-v2 to just datadog because:

  1. according to Package names and Effective Go: Names, package names:
    1. are in lower case. No upperCase or under_scores.
    2. are short
    3. don't need to be globally unique
  2. Quite a few packages from Datadog are just called datadog (search result). I don't think it's likely that a client code file that uses our Datadog CDK Construct V2 package will likely use another Datadog package.

@lym953 lym953 force-pushed the yiming.luo/support-golang branch from 7efd263 to e3a1fa8 Compare July 31, 2024 20:31
@lym953 lym953 force-pushed the yiming.luo/support-golang branch from e3a1fa8 to a10c530 Compare July 31, 2024 20:47
@lym953
Copy link
Contributor Author

lym953 commented Jul 31, 2024

Talked with @astuyve and renamed the package as ddcdkconstruct.

@lym953
Copy link
Contributor Author

lym953 commented Jul 31, 2024

/merge

@dd-devflow
Copy link

dd-devflow bot commented Jul 31, 2024

🚂 MergeQueue: pull request added to the queue

The median merge time in main is 0s.

Use /merge -c to cancel this operation!

@dd-mergequeue dd-mergequeue bot merged commit 12874d5 into main Jul 31, 2024
13 checks passed
@dd-mergequeue dd-mergequeue bot deleted the yiming.luo/support-golang branch July 31, 2024 20:57
@lym953 lym953 linked an issue Aug 1, 2024 that may be closed by this pull request
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.

Go support
3 participants