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

Add gotmpl tool #280

Merged
merged 6 commits into from
Mar 29, 2023
Merged

Add gotmpl tool #280

merged 6 commits into from
Mar 29, 2023

Conversation

pellared
Copy link
Member

@pellared pellared commented Mar 21, 2023

Why

Follows #275 (next iteration)

Fixes #276

Towards addressing open-telemetry/opentelemetry-go#3846

Towards fixing open-telemetry/opentelemetry-go#3548

What

Add gotmpl tool that can be used with go:generate.

This tool is currently needed for https://github.com/open-telemetry/opentelemetry-go. See: open-telemetry/opentelemetry-go#3846. We want to use it automate sharing internal code (more in README.md) without introducing a lot of manual code duplication.

Other

Do we want to use it for internal/repo and internal/syncerror? Personally, I think there is no big need as these APIs looks pretty stable. And AFAIK the tools are bumped together. On the other hand, it may be good to dogfood for the sake of consistency across OTel Go repositories. Because I cannot find a clear answer myself, I can simply create a follow-up PR once this one is merged. It should be easier for the reviewers to decide.

@codecov
Copy link

codecov bot commented Mar 21, 2023

Codecov Report

Patch coverage: 61.11% and project coverage change: +0.03 🎉

Comparison is base (b74c198) 58.95% compared to head (7e4ad9e) 58.99%.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #280      +/-   ##
==========================================
+ Coverage   58.95%   58.99%   +0.03%     
==========================================
  Files          44       46       +2     
  Lines        1988     2024      +36     
==========================================
+ Hits         1172     1194      +22     
- Misses        686      698      +12     
- Partials      130      132       +2     
Impacted Files Coverage Δ
gotmpl/main.go 0.00% <0.00%> (ø)
gotmpl/gotmpl.go 78.57% <78.57%> (ø)

Help us with your feedback. Take ten seconds to tell us how you rate us. Have a feature suggestion? Share it here.

☔ View full report in Codecov by Sentry.
📢 Do you have feedback about the report comment? Let us know in this issue.

@pellared pellared marked this pull request as ready for review March 21, 2023 11:04
@pellared pellared requested review from a team as code owners March 21, 2023 11:04
@pellared pellared requested a review from Aneurysm9 March 21, 2023 11:04
gotmpl/README.md Outdated Show resolved Hide resolved
gotmpl/README.md Outdated Show resolved Hide resolved
gotmpl/README.md Outdated Show resolved Hide resolved
gotmpl/README.md Outdated Show resolved Hide resolved
gotmpl/README.md Outdated Show resolved Hide resolved
gotmpl/gotmpl.go Show resolved Hide resolved
gotmpl/main.go Outdated Show resolved Hide resolved
@pellared pellared requested a review from MrAlias March 22, 2023 15:54
Copy link
Contributor

@MrAlias MrAlias left a comment

Choose a reason for hiding this comment

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

🥇

@MrAlias MrAlias merged commit 799bb8e into open-telemetry:main Mar 29, 2023
@pellared pellared deleted the gotmpl branch March 29, 2023 14:30
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.

Add a tool facilitating sharing Go code across Go modules
3 participants