Skip to content

Conversation

@mfcollins3
Copy link
Contributor

Closes #754

I enhanced GolangAppHostingExtension to define a new override of AddGolangApp that allows specifying the path of the Golang executable relative to the working directory. This is useful for scenarios where the Golang executable is in a cmd subdirectory, but the working directory needs to be the root of the project for accessing resources relative to the working directory at runtime. It is also useful when there are more than one executable in a Go module.

I updated the existing AddGolangApp method to call the new overload passing . as the executable path. This will support existing consumers without breaking their integrations.

PR Checklist

  • Created a feature/dev branch in your fork (vs. submitting directly from a commit on main)
  • Based off latest main branch of toolkit
  • PR doesn't include merge commits (always rebase on top of our main, if needed)
  • New integration
    • Docs are written
    • Added description of major feature to project description for NuGet package (4000 total character limit, so don't push entire description over that)
  • Tests for the changes have been added (for bug fixes / features) (if applicable)
  • Contains NO breaking changes
  • Every new API (including internal ones) has full XML docs
  • Code follows all style conventions

Other information

I enhanced GolangAppHostingExtension to define a new override of
AddGolangApp that allows specifying the path of the Golang executable
relative to the working directory. This is useful for scenarios where
the Golang executable is in a `cmd` subdirectory, but the working
directory needs to be the root of the project for accessing resources
relative to the working directory at runtime. It is also useful when
there are more than one Golang executable in a Go module.

Resolves CommunityToolkit#754
@tommasodotNET
Copy link
Contributor

tommasodotNET commented Jul 19, 2025

Thank you for your contribution! I'm currently oof, I'll be back on the 26th, and I'll review this pr asap 🙂

@github-actions github-actions bot added the Stale label Jul 25, 2025
@github-actions github-actions bot closed this Jul 27, 2025
@mfcollins3
Copy link
Contributor Author

Thank you for your contribution! I'm currently oof, I'll be back on the 26th, and I'll review this pr asap 🙂

@tommasodotNET This PR got closed. Can you re-open it?

@tommasodotNET tommasodotNET reopened this Jul 27, 2025
Copy link
Contributor

@tommasodotNET tommasodotNET left a comment

Choose a reason for hiding this comment

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

lgtm, thanks!

@github-actions github-actions bot removed the Stale label Jul 28, 2025
@tommasodotNET tommasodotNET enabled auto-merge (squash) July 28, 2025 08:44
@tommasodotNET tommasodotNET merged commit 4e8419f into CommunityToolkit:main Jul 28, 2025
96 checks passed
@mfcollins3 mfcollins3 deleted the 754-golang-executable-path branch July 28, 2025 12:06
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.

[Feature] Add Executable Path for Go Application

2 participants