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

Golang example tweak - add go-build path - rebuild page TOC #577

Merged
merged 5 commits into from
Jun 1, 2021
Merged

Golang example tweak - add go-build path - rebuild page TOC #577

merged 5 commits into from
Jun 1, 2021

Conversation

magnetikonline
Copy link
Contributor

A few small things:

  • Noted in the Golang cache example, worthwhile to include the ~/.cache/go-build path (build cache) in addition to the module cache.
  • Fixed up some whitespace while in the area.

Finally, noted the TOC was a little out of sync - so fixed it up with (warning, self plug!) my little Markdown TOC generate utility.

@magnetikonline magnetikonline requested a review from a team as a code owner May 4, 2021 06:28
Copy link
Member

@dhadka dhadka left a comment

Choose a reason for hiding this comment

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

Finally, noted the TOC was a little out of sync - so fixed it up with (warning, self plug!) my little Markdown TOC generate utility.

Hey, that's an awesome utility! Turn it into a GitHub Action so it can check TOCs before merging PRs! 😜

Just one comment/question about the path on different OS'es. Thanks for submitting this PR!

@@ -114,7 +118,9 @@ steps:
```yaml
- uses: actions/cache@v2
with:
path: ~/go/pkg/mod
path: |
~/.cache/go-build
Copy link
Member

@dhadka dhadka May 20, 2021

Choose a reason for hiding this comment

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

I'm not familiar with Golang, but while googling this I came across this cache example that shows different paths for different OS'es. That link suggests this only works on Linux, correct? Is there an env var or command that can be used to get the build cache path dynamically? Or list out the paths to use for different OS'es?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

🤦

Oh @dhadka you're on the money 👍 - this is why we have +1's 😄 .

I'll update the PR now with a cross-os way of doing this 👍 . Sorry, I spend my life in Linux build agents typically.

@magnetikonline
Copy link
Contributor Author

Hey, that's an awesome utility! Turn it into a GitHub Action so it can check TOCs before merging PRs!

Thanks 👍 - something I might have to consider doing.

@magnetikonline magnetikonline requested review from dhadka and removed request for a team May 21, 2021 00:02
@magnetikonline
Copy link
Contributor Author

Thanks @dhadka - split out the examples into Linux/macOS/Windows versions in 9c0250e.

I was thinking, the alternative is you could call go env GOCACHE in a prior step - make that an output variable and reference it in the cache path parameter - that would make the workflow truly cross platform - but seems more effort than it's worth.

@magnetikonline magnetikonline changed the title Golang example tweak - add go-build path Golang example tweak - add go-build path - rebuild page TOC May 21, 2021
@magnetikonline
Copy link
Contributor Author

Small bump @dhadka (seems I can't re-request a review).

Copy link
Member

@dhadka dhadka left a comment

Choose a reason for hiding this comment

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

TY for making those changes!

@dhadka dhadka merged commit 0638051 into actions:main Jun 1, 2021
@magnetikonline
Copy link
Contributor Author

Thanks @dhadka 👍

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